diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-06-21 19:19:31 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-06-21 19:19:31 +0000 |
commit | ea2a5e689754fa5c603aa0d01b6658fbbaf9fe43 (patch) | |
tree | 1990be84b2c1dd12a032ea6a7ffa0f67bd33ff60 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | d4f397741bb00b0e61e1dc85f461ebcbce88e370 (diff) | |
download | bcm5719-llvm-ea2a5e689754fa5c603aa0d01b6658fbbaf9fe43.tar.gz bcm5719-llvm-ea2a5e689754fa5c603aa0d01b6658fbbaf9fe43.zip |
Delete dead code.
Found by gcc 6.
llvm-svn: 273300
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 4a3c31b1d19..0836bdcc9f4 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2374,59 +2374,6 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, return Success; } -namespace { - - class ModuleSignature { - SmallVector<uint64_t, 16> Data; - unsigned CurBit; - uint64_t CurValue; - - public: - ModuleSignature() : CurBit(0), CurValue(0) { } - - void add(uint64_t Value, unsigned Bits); - void add(StringRef Value); - void flush(); - - llvm::APInt getAsInteger() const; - }; -} - -void ModuleSignature::add(uint64_t Value, unsigned int NumBits) { - CurValue |= Value << CurBit; - if (CurBit + NumBits < 64) { - CurBit += NumBits; - return; - } - - // Add the current word. - Data.push_back(CurValue); - - if (CurBit) - CurValue = Value >> (64-CurBit); - else - CurValue = 0; - CurBit = (CurBit+NumBits) & 63; -} - -void ModuleSignature::flush() { - if (CurBit == 0) - return; - - Data.push_back(CurValue); - CurBit = 0; - CurValue = 0; -} - -void ModuleSignature::add(StringRef Value) { - for (auto &c : Value) - add(c, 8); -} - -llvm::APInt ModuleSignature::getAsInteger() const { - return llvm::APInt(Data.size() * 64, Data); -} - std::string CompilerInvocation::getModuleHash() const { // Note: For QoI reasons, the things we use as a hash here should all be // dumped via the -module-info flag. |