diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2011-04-06 12:29:09 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2011-04-06 12:29:09 +0000 |
commit | ba3e6667cce786c47e996376ef211b1033cce663 (patch) | |
tree | 3c292c29b7edd0678aea2318b4806de47d76d7fe /clang/lib | |
parent | eafa4e4b5bee6f95382bc3cc8b08c9368e054717 (diff) | |
download | bcm5719-llvm-ba3e6667cce786c47e996376ef211b1033cce663.tar.gz bcm5719-llvm-ba3e6667cce786c47e996376ef211b1033cce663.zip |
Do not use IR marker for LLVM intrinsics
llvm-svn: 129001
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/AST/ItaniumMangle.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp index bb274a96f1c..6ab68dbae92 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/lib/AST/ItaniumMangle.cpp @@ -334,10 +334,11 @@ void CXXNameMangler::mangle(const NamedDecl *D, llvm::StringRef Prefix) { // another has a "\01foo". That is known to happen on ELF with the // tricks normally used for producing aliases (PR9177). Fortunately the // llvm mangler on ELF is a nop, so we can just avoid adding the \01 - // marker. + // marker. We also avoid adding the marker if this is an alias for an + // LLVM intrinsic. llvm::StringRef UserLabelPrefix = getASTContext().Target.getUserLabelPrefix(); - if (!UserLabelPrefix.empty()) + if (!UserLabelPrefix.empty() && !ALA->getLabel().startswith("llvm.")) Out << '\01'; // LLVM IR Marker for __asm("foo") Out << ALA->getLabel(); |