r273300 - Delete dead code.
Rafael Espindola via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 21 12:19:31 PDT 2016
Author: rafael
Date: Tue Jun 21 14:19:31 2016
New Revision: 273300
URL: http://llvm.org/viewvc/llvm-project?rev=273300&view=rev
Log:
Delete dead code.
Found by gcc 6.
Modified:
cfe/trunk/lib/AST/ItaniumMangle.cpp
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=273300&r1=273299&r2=273300&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ItaniumMangle.cpp (original)
+++ cfe/trunk/lib/AST/ItaniumMangle.cpp Tue Jun 21 14:19:31 2016
@@ -316,7 +316,6 @@ private:
bool mangleSubstitution(TemplateName Template);
bool mangleSubstitution(uintptr_t Ptr);
- void mangleExistingSubstitution(QualType type);
void mangleExistingSubstitution(TemplateName name);
bool mangleStandardSubstitution(const NamedDecl *ND);
@@ -3875,12 +3874,6 @@ void CXXNameMangler::mangleSeqID(unsigne
Out << '_';
}
-void CXXNameMangler::mangleExistingSubstitution(QualType type) {
- bool result = mangleSubstitution(type);
- assert(result && "no existing substitution for type");
- (void) result;
-}
-
void CXXNameMangler::mangleExistingSubstitution(TemplateName tname) {
bool result = mangleSubstitution(tname);
assert(result && "no existing substitution for template name");
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=273300&r1=273299&r2=273300&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Tue Jun 21 14:19:31 2016
@@ -2374,59 +2374,6 @@ bool CompilerInvocation::CreateFromArgs(
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.
More information about the cfe-commits
mailing list