summaryrefslogtreecommitdiff
path: root/lib/Bitcode/Reader/BitcodeReader.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-10-06 01:22:42 +0000
committerBill Wendling <isanbard@gmail.com>2010-10-06 01:22:42 +0000
commit34711747a1d2c8713e69333bacef1c880810e371 (patch)
tree0dc76a5863ab9848365c88c02692d7b730104c94 /lib/Bitcode/Reader/BitcodeReader.h
parent417b54354b3fcccb4f5919b8d2d9dcd8bba50069 (diff)
downloadllvm-34711747a1d2c8713e69333bacef1c880810e371.tar.gz
llvm-34711747a1d2c8713e69333bacef1c880810e371.tar.bz2
llvm-34711747a1d2c8713e69333bacef1c880810e371.tar.xz
Provide a fast "get me the target triple from the module" API. This can
drastically reduce the linking time during LTO. Patch by Shantonu Sen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Reader/BitcodeReader.h')
-rw-r--r--lib/Bitcode/Reader/BitcodeReader.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h
index 053121bdad..f8fc079c73 100644
--- a/lib/Bitcode/Reader/BitcodeReader.h
+++ b/lib/Bitcode/Reader/BitcodeReader.h
@@ -212,6 +212,10 @@ public:
/// @brief Main interface to parsing a bitcode buffer.
/// @returns true if an error occurred.
bool ParseBitcodeInto(Module *M);
+
+ /// @brief Cheap mechanism to just extract module triple
+ /// @returns true if an error occurred.
+ bool ParseTriple(std::string &Triple);
private:
const Type *getTypeByID(unsigned ID, bool isTypeTable = false);
Value *getFnValueByID(unsigned ID, const Type *Ty) {
@@ -270,6 +274,7 @@ private:
bool ResolveGlobalAndAliasInits();
bool ParseMetadata();
bool ParseMetadataAttachment();
+ bool ParseModuleTriple(std::string &Triple);
};
} // End llvm namespace