aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AsmParser
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-03-02 04:14:42 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-03-02 04:14:42 +0000
commit38c4e535493363b96eac47af9e7c056530137bea (patch)
tree02b99cf243d4f23b72a93f2f8d3fa49ff82cba67 /lib/AsmParser
parentf7af396c9571e4efe944c5bf739bce667f99556a (diff)
downloadexternal_llvm-38c4e535493363b96eac47af9e7c056530137bea.zip
external_llvm-38c4e535493363b96eac47af9e7c056530137bea.tar.gz
external_llvm-38c4e535493363b96eac47af9e7c056530137bea.tar.bz2
Add a special streamer to libLTO that just records symbols definitions and
uses. The result produced by the streamer is used to give the linker more accurate information and to add to llvm.compiler.used. The second improvement removes the need for the user to add __attribute__((used)) to functions only used in inline asm. The first one lets us build firefox with LTO on Darwin :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126830 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r--lib/AsmParser/LLParser.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index cdfacbe..fc10c04 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -249,11 +249,7 @@ bool LLParser::ParseModuleAsm() {
if (ParseToken(lltok::kw_asm, "expected 'module asm'") ||
ParseStringConstant(AsmStr)) return true;
- const std::string &AsmSoFar = M->getModuleInlineAsm();
- if (AsmSoFar.empty())
- M->setModuleInlineAsm(AsmStr);
- else
- M->setModuleInlineAsm(AsmSoFar+"\n"+AsmStr);
+ M->appendModuleInlineAsm(AsmStr);
return false;
}