diff options
Diffstat (limited to 'tools/llvm-mc/llvm-mc.cpp')
-rw-r--r-- | tools/llvm-mc/llvm-mc.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index c0976502f545..ec189c297860 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -1,9 +1,8 @@ //===-- llvm-mc.cpp - Machine Code Hacking Driver ---------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -402,18 +401,8 @@ int main(int argc, char **argv) { } if (!MainFileName.empty()) Ctx.setMainFileName(MainFileName); - if (GenDwarfForAssembly && DwarfVersion >= 5) { - // DWARF v5 needs the root file as well as the compilation directory. - // If we find a '.file 0' directive that will supersede these values. - MD5 Hash; - MD5::MD5Result *Cksum = - (MD5::MD5Result *)Ctx.allocate(sizeof(MD5::MD5Result), 1); - Hash.update(Buffer->getBuffer()); - Hash.final(*Cksum); - Ctx.setMCLineTableRootFile( - /*CUID=*/0, Ctx.getCompilationDir(), - !MainFileName.empty() ? MainFileName : InputFilename, Cksum, None); - } + if (GenDwarfForAssembly) + Ctx.setGenDwarfRootFile(InputFilename, Buffer->getBuffer()); // Package up features to be passed to target/subtarget std::string FeaturesStr; |