? llvm::DICompileUnit::DebugNameTableKind::None
: static_cast<llvm::DICompileUnit::DebugNameTableKind>(
CGOpts.DebugNameTable),
- CGOpts.DebugRangesBaseAddress, remapDIPath(Sysroot), SDK);
+ CGOpts.DebugRangesBaseAddress, Sysroot, SDK);
}
llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) {
// RUN: %clang_cc1 -debug-info-kind=standalone -fdebug-prefix-map=%p=/UNLIKELY_PATH=empty %s -emit-llvm -o - | FileCheck %s -check-prefix CHECK-EVIL
// RUN: %clang_cc1 -debug-info-kind=standalone -fdebug-prefix-map=%p=/UNLIKELY_PATH/empty %s -emit-llvm -o - -main-file-name debug-prefix-map.c | FileCheck %s
// RUN: %clang_cc1 -debug-info-kind=standalone -fdebug-prefix-map=%p=/UNLIKELY_PATH/empty %s -emit-llvm -o - -fdebug-compilation-dir %p | FileCheck %s -check-prefix CHECK-COMPILATION-DIR
-// RUN: %clang_cc1 -debug-info-kind=standalone -fdebug-prefix-map=%p=/UNLIKELY_PATH/empty %s -emit-llvm -o - -isysroot %p -debugger-tuning=lldb | FileCheck %s -check-prefix CHECK-SYSROOT
// RUN: %clang -g -fdebug-prefix-map=%p=/UNLIKELY_PATH/empty -S -c %s -emit-llvm -o - | FileCheck %s
// RUN: %clang -g -ffile-prefix-map=%p=/UNLIKELY_PATH/empty -S -c %s -emit-llvm -o - | FileCheck %s
// CHECK-COMPILATION-DIR: !DIFile(filename: "{{.*}}", directory: "/UNLIKELY_PATH/empty")
// CHECK-COMPILATION-DIR: !DIFile(filename: "{{.*}}Inputs/stdio.h", directory: "/UNLIKELY_PATH/empty")
// CHECK-COMPILATION-DIR-NOT: !DIFile(filename:
-// CHECK-SYSROOT: !DICompileUnit({{.*}}sysroot: "/UNLIKELY_PATH/empty"
return 0;
}
-static std::string remapPath(std::string Path,
- const objectPrefixMap &ObjectPrefixMap) {
- StringRef PathRef(Path);
- for (const auto &Entry : ObjectPrefixMap)
- if (PathRef.startswith(Entry.first))
- return (Twine(Entry.second) + PathRef.substr(Entry.first.size())).str();
- return Path;
-}
-
bool DWARFLinker::registerModuleReference(
DWARFDie CUDie, const DWARFUnit &Unit, const DwarfFile &File,
OffsetsStringPool &StringPool, UniquingStringPool &UniquingStringPool,