summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit0198ce06fc571de7b6dc4c416a316781a2344a6c (patch)
treef10bd06b116d3ae791be7b927a26ac431eb4bb69 /llvm/lib/Bitcode/Reader/BitcodeReader.h
parent1fc81e90f734d8dd81f8851580d16d88152c876e (diff)
downloadbcm5719-llvm-0198ce06fc571de7b6dc4c416a316781a2344a6c.tar.gz
bcm5719-llvm-0198ce06fc571de7b6dc4c416a316781a2344a6c.zip
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! llvm-svn: 115728
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.h')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.h b/llvm/lib/Bitcode/Reader/BitcodeReader.h
index 053121bdad6..f8fc079c73d 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.h
+++ b/llvm/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
OpenPOWER on IntegriCloud