mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
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
This commit is contained in:
@@ -211,15 +211,20 @@ public:
|
||||
void setTargetTriple(StringRef T) { TargetTriple = T; }
|
||||
|
||||
/// Set the module-scope inline assembly blocks.
|
||||
void setModuleInlineAsm(StringRef Asm) { GlobalScopeAsm = Asm; }
|
||||
void setModuleInlineAsm(StringRef Asm) {
|
||||
GlobalScopeAsm = Asm;
|
||||
if (!GlobalScopeAsm.empty() &&
|
||||
GlobalScopeAsm[GlobalScopeAsm.size()-1] != '\n')
|
||||
GlobalScopeAsm += '\n';
|
||||
}
|
||||
|
||||
/// Append to the module-scope inline assembly blocks, automatically inserting
|
||||
/// a separating newline if necessary.
|
||||
void appendModuleInlineAsm(StringRef Asm) {
|
||||
GlobalScopeAsm += Asm;
|
||||
if (!GlobalScopeAsm.empty() &&
|
||||
GlobalScopeAsm[GlobalScopeAsm.size()-1] != '\n')
|
||||
GlobalScopeAsm += '\n';
|
||||
GlobalScopeAsm += Asm;
|
||||
}
|
||||
|
||||
/// @}
|
||||
|
Reference in New Issue
Block a user