Update clang to r339409.
Change-Id: I800772d2d838223be1f6b40d490c4591b937fca2
diff --git a/linux-x64/clang/include/llvm/IR/Module.h b/linux-x64/clang/include/llvm/IR/Module.h
index 58e4bc4..a405f7d 100644
--- a/linux-x64/clang/include/llvm/IR/Module.h
+++ b/linux-x64/clang/include/llvm/IR/Module.h
@@ -59,7 +59,7 @@
/// A module maintains a GlobalValRefMap object that is used to hold all
/// constant references to global variables in the module. When a global
/// variable is destroyed, it should have no entries in the GlobalValueRefMap.
-/// @brief The main container class for the LLVM Intermediate Representation.
+/// The main container class for the LLVM Intermediate Representation.
class Module {
/// @name Types And Enumerations
/// @{
@@ -207,13 +207,18 @@
/// @returns the module identifier as a string
const std::string &getModuleIdentifier() const { return ModuleID; }
+ /// Returns the number of non-debug IR instructions in the module.
+ /// This is equivalent to the sum of the IR instruction counts of each
+ /// function contained in the module.
+ unsigned getInstructionCount();
+
/// Get the module's original source file name. When compiling from
/// bitcode, this is taken from a bitcode record where it was recorded.
/// For other compiles it is the same as the ModuleID, which would
/// contain the source file name.
const std::string &getSourceFileName() const { return SourceFileName; }
- /// \brief Get a short "name" for the module.
+ /// Get a short "name" for the module.
///
/// This is useful for debugging or logging. It is essentially a convenience
/// wrapper around getModuleIdentifier().
@@ -251,9 +256,16 @@
/// versions when the pass does not change.
std::unique_ptr<RandomNumberGenerator> createRNG(const Pass* P) const;
-/// @}
-/// @name Module Level Mutators
-/// @{
+ /// Return true if size-info optimization remark is enabled, false
+ /// otherwise.
+ bool shouldEmitInstrCountChangedRemark() {
+ return getContext().getDiagHandlerPtr()->isAnalysisRemarkEnabled(
+ "size-info");
+ }
+
+ /// @}
+ /// @name Module Level Mutators
+ /// @{
/// Set the module identifier.
void setModuleIdentifier(StringRef ID) { ModuleID = ID; }
@@ -795,14 +807,14 @@
/// @name Utility functions for querying Debug information.
/// @{
- /// \brief Returns the Number of Register ParametersDwarf Version by checking
+ /// Returns the Number of Register ParametersDwarf Version by checking
/// module flags.
unsigned getNumberRegisterParameters() const;
- /// \brief Returns the Dwarf Version by checking module flags.
+ /// Returns the Dwarf Version by checking module flags.
unsigned getDwarfVersion() const;
- /// \brief Returns the CodeView Version by checking module flags.
+ /// Returns the CodeView Version by checking module flags.
/// Returns zero if not present in module.
unsigned getCodeViewFlag() const;
@@ -810,10 +822,10 @@
/// @name Utility functions for querying and setting PIC level
/// @{
- /// \brief Returns the PIC level (small or large model)
+ /// Returns the PIC level (small or large model)
PICLevel::Level getPICLevel() const;
- /// \brief Set the PIC level (small or large model)
+ /// Set the PIC level (small or large model)
void setPICLevel(PICLevel::Level PL);
/// @}
@@ -821,20 +833,20 @@
/// @name Utility functions for querying and setting PIE level
/// @{
- /// \brief Returns the PIE level (small or large model)
+ /// Returns the PIE level (small or large model)
PIELevel::Level getPIELevel() const;
- /// \brief Set the PIE level (small or large model)
+ /// Set the PIE level (small or large model)
void setPIELevel(PIELevel::Level PL);
/// @}
/// @name Utility functions for querying and setting PGO summary
/// @{
- /// \brief Attach profile summary metadata to this module.
+ /// Attach profile summary metadata to this module.
void setProfileSummary(Metadata *M);
- /// \brief Returns profile summary metadata
+ /// Returns profile summary metadata
Metadata *getProfileSummary();
/// @}
@@ -849,7 +861,7 @@
void setOwnedMemoryBuffer(std::unique_ptr<MemoryBuffer> MB);
};
-/// \brief Given "llvm.used" or "llvm.compiler.used" as a global name, collect
+/// Given "llvm.used" or "llvm.compiler.used" as a global name, collect
/// the initializer elements of that global in Set and return the global itself.
GlobalVariable *collectUsedGlobalVariables(const Module &M,
SmallPtrSetImpl<GlobalValue *> &Set,