diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-03-29 08:27:32 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-03-29 08:27:32 +0000 |
commit | 24b878031d4f62baf0e9a0573aeebc9dfd54b546 (patch) | |
tree | c89151b92459ef1ee4ed9bccc8bbc0e3a6c4a309 /tools/lto/LTOModule.h | |
parent | 9e6ddcb88ec40422c0ebd260567e2264ec424506 (diff) | |
download | llvm-24b878031d4f62baf0e9a0573aeebc9dfd54b546.tar.gz llvm-24b878031d4f62baf0e9a0573aeebc9dfd54b546.tar.bz2 llvm-24b878031d4f62baf0e9a0573aeebc9dfd54b546.tar.xz |
Make some headway towards compiling all of LLVM.
Module-level ASM may contain definitions of functions and globals. However, we
were not telling the linker that these globals had definitions. As far as it was
concerned, they were just declarations.
Attempt to resolve this by inserting module-level ASM functions and globals into
the '_symbol' set so that the linker will know that they have values.
This gets us further towards our goal of compiling LLVM, but it still has
problems when linking libLTO.dylib because of the `-dead_strip' flag that's
passed to the linker.
<rdar://problem/11124216>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153638 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto/LTOModule.h')
-rw-r--r-- | tools/lto/LTOModule.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/lto/LTOModule.h b/tools/lto/LTOModule.h index 2c529482fc..e5f6dea7a7 100644 --- a/tools/lto/LTOModule.h +++ b/tools/lto/LTOModule.h @@ -43,8 +43,10 @@ private: typedef llvm::StringMap<uint8_t> StringSet; struct NameAndAttributes { - const char *name; - uint32_t attributes; + const char *name; + uint32_t attributes; + bool isFunction; + llvm::GlobalValue *symbol; }; llvm::OwningPtr<llvm::Module> _module; @@ -134,7 +136,7 @@ private: /// addPotentialUndefinedSymbol - Add a symbol which isn't defined just yet /// to a list to be resolved later. - void addPotentialUndefinedSymbol(llvm::GlobalValue *dcl); + void addPotentialUndefinedSymbol(llvm::GlobalValue *dcl, bool isFunc); /// addDefinedSymbol - Add a defined symbol to the list. void addDefinedSymbol(llvm::GlobalValue *def, bool isFunction); |