summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2015-11-02 18:02:11 +0000
committerTeresa Johnson <tejohnson@google.com>2015-11-02 18:02:11 +0000
commitf72278f051552eb4dc90a870fece327d77801fe4 (patch)
treeb9dcf8e67a0acf0bdbc1965f0daa3701c4f823ef /llvm/include
parent89a6eefe6f2ea949bd7090a7947dc5ec9c11d17f (diff)
downloadbcm5719-llvm-f72278f051552eb4dc90a870fece327d77801fe4.tar.gz
bcm5719-llvm-f72278f051552eb4dc90a870fece327d77801fe4.zip
Clang format a few prior patches (NFC)
I had clang formatted my earlier patches using the wrong style. Reformatted with the LLVM style. llvm-svn: 251812
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Bitcode/BitstreamWriter.h4
-rw-r--r--llvm/include/llvm/Bitcode/ReaderWriter.h16
-rw-r--r--llvm/include/llvm/IR/FunctionInfo.h18
-rw-r--r--llvm/include/llvm/Object/Binary.h6
-rw-r--r--llvm/include/llvm/Object/FunctionIndexObjectFile.h10
5 files changed, 26 insertions, 28 deletions
diff --git a/llvm/include/llvm/Bitcode/BitstreamWriter.h b/llvm/include/llvm/Bitcode/BitstreamWriter.h
index 4988d5fcad3..438f4a6fb69 100644
--- a/llvm/include/llvm/Bitcode/BitstreamWriter.h
+++ b/llvm/include/llvm/Bitcode/BitstreamWriter.h
@@ -73,9 +73,7 @@ class BitstreamWriter {
reinterpret_cast<const char *>(&Value + 1));
}
- size_t GetBufferOffset() const {
- return Out.size();
- }
+ size_t GetBufferOffset() const { return Out.size(); }
size_t GetWordIndex() const {
size_t Offset = GetBufferOffset();
diff --git a/llvm/include/llvm/Bitcode/ReaderWriter.h b/llvm/include/llvm/Bitcode/ReaderWriter.h
index 938edf278f7..3308084fbd8 100644
--- a/llvm/include/llvm/Bitcode/ReaderWriter.h
+++ b/llvm/include/llvm/Bitcode/ReaderWriter.h
@@ -68,9 +68,10 @@ namespace llvm {
/// the index. Otherwise skip the function summary section, and only create
/// an index object with a map from function name to function summary offset.
/// The index is used to perform lazy function summary reading later.
- ErrorOr<std::unique_ptr<FunctionInfoIndex>> getFunctionInfoIndex(
- MemoryBufferRef Buffer, LLVMContext &Context,
- DiagnosticHandlerFunction DiagnosticHandler, bool IsLazy = false);
+ ErrorOr<std::unique_ptr<FunctionInfoIndex>>
+ getFunctionInfoIndex(MemoryBufferRef Buffer, LLVMContext &Context,
+ DiagnosticHandlerFunction DiagnosticHandler,
+ bool IsLazy = false);
/// This method supports lazy reading of function summary data from the
/// combined index during function importing. When reading the combined index
@@ -78,10 +79,11 @@ namespace llvm {
/// Then this method is called for each function considered for importing,
/// to parse the summary information for the given function name into
/// the index.
- std::error_code readFunctionSummary(
- MemoryBufferRef Buffer, LLVMContext &Context,
- DiagnosticHandlerFunction DiagnosticHandler, StringRef FunctionName,
- std::unique_ptr<FunctionInfoIndex> Index);
+ std::error_code
+ readFunctionSummary(MemoryBufferRef Buffer, LLVMContext &Context,
+ DiagnosticHandlerFunction DiagnosticHandler,
+ StringRef FunctionName,
+ std::unique_ptr<FunctionInfoIndex> Index);
/// \brief Write the specified module to the specified raw output stream.
///
diff --git a/llvm/include/llvm/IR/FunctionInfo.h b/llvm/include/llvm/IR/FunctionInfo.h
index a8dd2d9249e..264954757cf 100644
--- a/llvm/include/llvm/IR/FunctionInfo.h
+++ b/llvm/include/llvm/IR/FunctionInfo.h
@@ -30,7 +30,7 @@ namespace llvm {
/// This is a separate class from FunctionInfo to enable lazy reading of this
/// function summary information from the combined index file during imporing.
class FunctionSummary {
- private:
+private:
/// \brief Path of module containing function IR, used to locate module when
/// importing this function.
///
@@ -57,7 +57,7 @@ class FunctionSummary {
/// during the initial compile step when the function index is first built.
unsigned InstCount;
- public:
+public:
/// Construct a summary object from summary data expected for all
/// summary records.
FunctionSummary(unsigned NumInsts) : InstCount(NumInsts) {}
@@ -90,7 +90,7 @@ class FunctionSummary {
/// record. After parsing the associated summary information from the summary
/// block the \a FunctionSummary is populated and stored here.
class FunctionInfo {
- private:
+private:
/// Function summary information used to help make ThinLTO importing
/// decisions.
std::unique_ptr<FunctionSummary> Summary;
@@ -109,7 +109,7 @@ class FunctionInfo {
/// VST records with the summary records.
uint64_t BitcodeIndex;
- public:
+public:
/// Constructor used during parsing of VST entries.
FunctionInfo(uint64_t FuncOffset)
: Summary(nullptr), BitcodeIndex(FuncOffset) {}
@@ -157,7 +157,7 @@ typedef StringMap<uint64_t> ModulePathStringTableTy;
/// Class to hold module path string table and function map,
/// and encapsulate methods for operating on them.
class FunctionInfoIndex {
- private:
+private:
/// Map from function name to list of function information instances
/// for functions of that name (may be duplicates in the COMDAT case, e.g.).
FunctionInfoMapTy FunctionMap;
@@ -165,7 +165,7 @@ class FunctionInfoIndex {
/// Holds strings for combined index, mapping to the corresponding module ID.
ModulePathStringTableTy ModulePathStringTable;
- public:
+public:
FunctionInfoIndex() = default;
~FunctionInfoIndex() = default;
@@ -190,8 +190,8 @@ class FunctionInfoIndex {
}
/// Iterator to allow writer to walk through table during emission.
- iterator_range<StringMap<uint64_t>::const_iterator> modPathStringEntries()
- const {
+ iterator_range<StringMap<uint64_t>::const_iterator>
+ modPathStringEntries() const {
return llvm::make_range(ModulePathStringTable.begin(),
ModulePathStringTable.end());
}
@@ -225,6 +225,6 @@ class FunctionInfoIndex {
}
};
-} // End llvm namespace
+} // End llvm namespace
#endif
diff --git a/llvm/include/llvm/Object/Binary.h b/llvm/include/llvm/Object/Binary.h
index 36911d8f327..a0d1127781f 100644
--- a/llvm/include/llvm/Object/Binary.h
+++ b/llvm/include/llvm/Object/Binary.h
@@ -42,7 +42,7 @@ protected:
ID_Archive,
ID_MachOUniversalBinary,
ID_COFFImportFile,
- ID_IR, // LLVM IR
+ ID_IR, // LLVM IR
ID_FunctionIndex, // Function summary index
// Object and children.
@@ -123,9 +123,7 @@ public:
return TypeID == ID_IR;
}
- bool isFunctionIndex() const {
- return TypeID == ID_FunctionIndex;
- }
+ bool isFunctionIndex() const { return TypeID == ID_FunctionIndex; }
bool isLittleEndian() const {
return !(TypeID == ID_ELF32B || TypeID == ID_ELF64B ||
diff --git a/llvm/include/llvm/Object/FunctionIndexObjectFile.h b/llvm/include/llvm/Object/FunctionIndexObjectFile.h
index b33fa6434fd..08eff540c94 100644
--- a/llvm/include/llvm/Object/FunctionIndexObjectFile.h
+++ b/llvm/include/llvm/Object/FunctionIndexObjectFile.h
@@ -29,7 +29,7 @@ class ObjectFile;
class FunctionIndexObjectFile : public SymbolicFile {
std::unique_ptr<FunctionInfoIndex> Index;
- public:
+public:
FunctionIndexObjectFile(MemoryBufferRef Object,
std::unique_ptr<FunctionInfoIndex> I);
~FunctionIndexObjectFile() override;
@@ -72,8 +72,8 @@ class FunctionIndexObjectFile : public SymbolicFile {
/// \brief Finds and returns bitcode in the given memory buffer (which may
/// be either a bitcode file or a native object file with embedded bitcode),
/// or an error code if not found.
- static ErrorOr<MemoryBufferRef> findBitcodeInMemBuffer(
- MemoryBufferRef Object);
+ static ErrorOr<MemoryBufferRef>
+ findBitcodeInMemBuffer(MemoryBufferRef Object);
/// \brief Looks for function summary in the given memory buffer,
/// returns true if found, else false.
@@ -83,8 +83,8 @@ class FunctionIndexObjectFile : public SymbolicFile {
/// \brief Parse function index in the given memory buffer.
/// Return new FunctionIndexObjectFile instance containing parsed function
/// summary/index.
- static ErrorOr<std::unique_ptr<FunctionIndexObjectFile>> create(
- MemoryBufferRef Object, LLVMContext &Context, bool IsLazy = false);
+ static ErrorOr<std::unique_ptr<FunctionIndexObjectFile>>
+ create(MemoryBufferRef Object, LLVMContext &Context, bool IsLazy = false);
/// \brief Parse the function summary information for function with the
/// given name out of the given buffer. Parsed information is
OpenPOWER on IntegriCloud