aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2018-02-07 01:46:46 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2018-02-07 01:46:46 +0000
commitfd4db5331e512d23d2d1c832065acbe226e7616d (patch)
treef82cc74b81c57e0ea53130d3e4891725d5e667bc /clang/lib/CodeGen/CodeGenModule.h
parentfd443e9b6cd0559f2dd6e51ae40eb54542fccbf0 (diff)
downloadllvm-fd4db5331e512d23d2d1c832065acbe226e7616d.zip
llvm-fd4db5331e512d23d2d1c832065acbe226e7616d.tar.gz
llvm-fd4db5331e512d23d2d1c832065acbe226e7616d.tar.bz2
Support `#pragma comment(lib, "name")` in the frontend for ELF
This adds the frontend support required to support the use of the comment pragma to enable auto linking on ELFish targets. This is a generic ELF extension supported by LLVM. We need to change the handling for the "dependentlib" in order to accommodate the previously discussed encoding for the dependent library descriptor. Without the custom handling of the PCK_Lib directive, the -l prefixed option would be encoded into the resulting object (which is treated as a frontend error). llvm-svn: 324438
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 42e9e1b..61b97e6 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -1094,6 +1094,8 @@ public:
/// value.
void AddDependentLib(StringRef Lib);
+ void AddELFLibDirective(StringRef Lib);
+
llvm::GlobalVariable::LinkageTypes getFunctionLinkage(GlobalDecl GD);
void setFunctionLinkage(GlobalDecl GD, llvm::Function *F) {