summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/TargetInfo.h
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-05-08 13:44:39 +0000
committerReid Kleckner <reid@kleckner.net>2013-05-08 13:44:39 +0000
commite43f0fea153bd67e39f085d92d9e12ada915bb99 (patch)
tree6e125ab241ac35e231eb1aca174c107b03fd2347 /clang/lib/CodeGen/TargetInfo.h
parent7bbd7aa7fe63f9df9e4d30355180cfcf0785973c (diff)
downloadbcm5719-llvm-e43f0fea153bd67e39f085d92d9e12ada915bb99.tar.gz
bcm5719-llvm-e43f0fea153bd67e39f085d92d9e12ada915bb99.zip
Forward #pragma comment(lib/linker) through as flags metadata
Summary: Most of this change is wiring the pragma all the way through from the lexer, parser, and sema to codegen. I considered adding a Decl AST node for this, but it seemed too heavyweight. Mach-O already uses a metadata flag called "Linker Options" to do this kind of auto-linking. This change follows that pattern. LLVM knows how to forward the "Linker Options" metadata into the COFF .drectve section where these flags belong. ELF support is not implemented, but possible. This is related to auto-linking, which is http://llvm.org/PR13016. CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D723 llvm-svn: 181426
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.h')
-rw-r--r--clang/lib/CodeGen/TargetInfo.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.h b/clang/lib/CodeGen/TargetInfo.h
index bb50ce69e31..dee7fd8dd40 100644
--- a/clang/lib/CodeGen/TargetInfo.h
+++ b/clang/lib/CodeGen/TargetInfo.h
@@ -18,6 +18,7 @@
#include "clang/AST/Type.h"
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/SmallString.h"
namespace llvm {
class GlobalValue;
@@ -167,6 +168,11 @@ namespace clang {
/// that unprototyped calls to varargs functions still succeed.
virtual bool isNoProtoCallVariadic(const CodeGen::CallArgList &args,
const FunctionNoProtoType *fnType) const;
+
+ /// Gets the linker options necessary to link a dependent library on this
+ /// platform.
+ virtual void getDependentLibraryOption(llvm::StringRef Lib,
+ llvm::SmallString<24> &Opt) const;
};
}
OpenPOWER on IntegriCloud