summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Mangle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/Mangle.cpp')
-rw-r--r--clang/lib/AST/Mangle.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/Mangle.cpp b/clang/lib/AST/Mangle.cpp
index 7a9cf18acc1..ee241732e8a 100644
--- a/clang/lib/AST/Mangle.cpp
+++ b/clang/lib/AST/Mangle.cpp
@@ -126,9 +126,9 @@ void MangleContext::mangleName(const NamedDecl *D, raw_ostream &Out) {
// llvm mangler on ELF is a nop, so we can just avoid adding the \01
// marker. We also avoid adding the marker if this is an alias for an
// LLVM intrinsic.
- StringRef UserLabelPrefix =
- getASTContext().getTargetInfo().getUserLabelPrefix();
- if (!UserLabelPrefix.empty() && !ALA->getLabel().startswith("llvm."))
+ char GlobalPrefix =
+ getASTContext().getTargetInfo().getDataLayout().getGlobalPrefix();
+ if (GlobalPrefix && !ALA->getLabel().startswith("llvm."))
Out << '\01'; // LLVM IR Marker for __asm("foo")
Out << ALA->getLabel();
OpenPOWER on IntegriCloud