summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/VMCore')
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp4
-rw-r--r--llvm/lib/VMCore/BasicBlock.cpp6
-rw-r--r--llvm/lib/VMCore/ConstantHandling.cpp4
-rw-r--r--llvm/lib/VMCore/Constants.cpp4
-rw-r--r--llvm/lib/VMCore/Dominators.cpp4
-rw-r--r--llvm/lib/VMCore/Function.cpp50
-rw-r--r--llvm/lib/VMCore/InstrTypes.cpp4
-rw-r--r--llvm/lib/VMCore/Instruction.cpp4
-rw-r--r--llvm/lib/VMCore/Module.cpp4
-rw-r--r--llvm/lib/VMCore/ModuleProvider.cpp4
-rw-r--r--llvm/lib/VMCore/Pass.cpp4
-rw-r--r--llvm/lib/VMCore/PassManagerT.h5
-rw-r--r--llvm/lib/VMCore/SlotCalculator.cpp4
-rw-r--r--llvm/lib/VMCore/SymbolTable.cpp4
-rw-r--r--llvm/lib/VMCore/SymbolTableListTraitsImpl.h4
-rw-r--r--llvm/lib/VMCore/Type.cpp3
-rw-r--r--llvm/lib/VMCore/Value.cpp4
-rw-r--r--llvm/lib/VMCore/Verifier.cpp60
-rw-r--r--llvm/lib/VMCore/iBranch.cpp4
-rw-r--r--llvm/lib/VMCore/iCall.cpp7
-rw-r--r--llvm/lib/VMCore/iMemory.cpp2
-rw-r--r--llvm/lib/VMCore/iOperators.cpp4
-rw-r--r--llvm/lib/VMCore/iSwitch.cpp4
23 files changed, 145 insertions, 52 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index c9c4dde7e85..67ccdd0f8de 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -33,6 +33,8 @@
#include "Support/STLExtras.h"
#include <algorithm>
+namespace llvm {
+
static RegisterPass<PrintModulePass>
X("printm", "Print module to stderr",PassInfo::Analysis|PassInfo::Optimization);
static RegisterPass<PrintFunctionPass>
@@ -1052,3 +1054,5 @@ CachedWriter &CachedWriter::operator<<(const Value *V) {
}
return *this;
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/BasicBlock.cpp b/llvm/lib/VMCore/BasicBlock.cpp
index 2458cda2036..63a722b33e4 100644
--- a/llvm/lib/VMCore/BasicBlock.cpp
+++ b/llvm/lib/VMCore/BasicBlock.cpp
@@ -22,6 +22,8 @@
#include "SymbolTableListTraitsImpl.h"
#include <algorithm>
+namespace llvm {
+
// DummyInst - An instance of this class is used to mark the end of the
// instruction list. This is not a real instruction.
//
@@ -141,7 +143,7 @@ void BasicBlock::dropAllReferences() {
//
bool BasicBlock::hasConstantReferences() const {
for (use_const_iterator I = use_begin(), E = use_end(); I != E; ++I)
- if (::isa<Constant>((Value*)*I))
+ if (isa<Constant>((Value*)*I))
return true;
return false;
@@ -263,3 +265,5 @@ BasicBlock *BasicBlock::splitBasicBlock(iterator I, const std::string &BBName) {
}
return New;
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/ConstantHandling.cpp b/llvm/lib/VMCore/ConstantHandling.cpp
index 32b9ebba742..7fb7a05e55d 100644
--- a/llvm/lib/VMCore/ConstantHandling.cpp
+++ b/llvm/lib/VMCore/ConstantHandling.cpp
@@ -17,6 +17,8 @@
#include "llvm/DerivedTypes.h"
#include <cmath>
+namespace llvm {
+
AnnotationID ConstRules::AID(AnnotationManager::getID("opt::ConstRules",
&ConstRules::find));
@@ -638,3 +640,5 @@ ConstRules *ConstRules::getConstantExprRules() {
static EmptyRules CERules;
return &CERules;
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp
index 28cc9d24e03..527eff54908 100644
--- a/llvm/lib/VMCore/Constants.cpp
+++ b/llvm/lib/VMCore/Constants.cpp
@@ -20,6 +20,8 @@
#include "Support/StringExtras.h"
#include <algorithm>
+namespace llvm {
+
ConstantBool *ConstantBool::True = new ConstantBool(true);
ConstantBool *ConstantBool::False = new ConstantBool(false);
@@ -1029,3 +1031,5 @@ unsigned Constant::mutateReferences(Value *OldV, Value *NewV) {
return NumReplaced;
}
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/Dominators.cpp b/llvm/lib/VMCore/Dominators.cpp
index c3bce78b5ad..cad66853c9c 100644
--- a/llvm/lib/VMCore/Dominators.cpp
+++ b/llvm/lib/VMCore/Dominators.cpp
@@ -20,6 +20,8 @@
#include "Support/DepthFirstIterator.h"
#include "Support/SetOperations.h"
+namespace llvm {
+
//===----------------------------------------------------------------------===//
// DominatorSet Implementation
//===----------------------------------------------------------------------===//
@@ -358,3 +360,5 @@ void DominanceFrontierBase::print(std::ostream &o) const {
o << " is:\t" << I->second << "\n";
}
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp
index f47ecea7af3..364cc6f733e 100644
--- a/llvm/lib/VMCore/Function.cpp
+++ b/llvm/lib/VMCore/Function.cpp
@@ -19,6 +19,8 @@
#include "Support/LeakDetector.h"
#include "SymbolTableListTraitsImpl.h"
+namespace llvm {
+
BasicBlock *ilist_traits<BasicBlock>::createNode() {
BasicBlock *Ret = new BasicBlock();
// This should not be garbage monitored.
@@ -158,7 +160,7 @@ void Function::dropAllReferences() {
}
/// getIntrinsicID - This method returns the ID number of the specified
-/// function, or LLVMIntrinsic::not_intrinsic if the function is not an
+/// function, or Intrinsic::not_intrinsic if the function is not an
/// intrinsic, or if the pointer is null. This value is always defined to be
/// zero to allow easy checking for whether a function is intrinsic or not. The
/// particular intrinsic functions which correspond to this value are defined in
@@ -176,21 +178,21 @@ unsigned Function::getIntrinsicID() const {
std::string name; // The name of the intrinsic
unsigned id; // Its ID number
} alpha_intrinsics[] = {
- { "llvm.alpha.ctlz", LLVMIntrinsic::alpha_ctlz },
- { "llvm.alpha.cttz", LLVMIntrinsic::alpha_cttz },
- { "llvm.alpha.ctpop", LLVMIntrinsic::alpha_ctpop },
- { "llvm.alpha.umulh", LLVMIntrinsic::alpha_umulh },
- { "llvm.alpha.vecop", LLVMIntrinsic::alpha_vecop },
- { "llvm.alpha.pup", LLVMIntrinsic::alpha_pup },
- { "llvm.alpha.bytezap", LLVMIntrinsic::alpha_bytezap },
- { "llvm.alpha.bytemanip", LLVMIntrinsic::alpha_bytemanip },
- { "llvm.alpha.dfp_bop", LLVMIntrinsic::alpha_dfpbop },
- { "llvm.alpha.dfp_uop", LLVMIntrinsic::alpha_dfpuop },
- { "llvm.alpha.unordered", LLVMIntrinsic::alpha_unordered },
- { "llvm.alpha.uqtodfp", LLVMIntrinsic::alpha_uqtodfp },
- { "llvm.alpha.uqtosfp", LLVMIntrinsic::alpha_uqtosfp },
- { "llvm.alpha.dfptosq", LLVMIntrinsic::alpha_dfptosq },
- { "llvm.alpha.sfptosq", LLVMIntrinsic::alpha_sfptosq },
+ { "llvm.alpha.ctlz", Intrinsic::alpha_ctlz },
+ { "llvm.alpha.cttz", Intrinsic::alpha_cttz },
+ { "llvm.alpha.ctpop", Intrinsic::alpha_ctpop },
+ { "llvm.alpha.umulh", Intrinsic::alpha_umulh },
+ { "llvm.alpha.vecop", Intrinsic::alpha_vecop },
+ { "llvm.alpha.pup", Intrinsic::alpha_pup },
+ { "llvm.alpha.bytezap", Intrinsic::alpha_bytezap },
+ { "llvm.alpha.bytemanip", Intrinsic::alpha_bytemanip },
+ { "llvm.alpha.dfp_bop", Intrinsic::alpha_dfpbop },
+ { "llvm.alpha.dfp_uop", Intrinsic::alpha_dfpuop },
+ { "llvm.alpha.unordered", Intrinsic::alpha_unordered },
+ { "llvm.alpha.uqtodfp", Intrinsic::alpha_uqtodfp },
+ { "llvm.alpha.uqtosfp", Intrinsic::alpha_uqtosfp },
+ { "llvm.alpha.dfptosq", Intrinsic::alpha_dfptosq },
+ { "llvm.alpha.sfptosq", Intrinsic::alpha_sfptosq },
};
const unsigned num_alpha_intrinsics =
sizeof(alpha_intrinsics) / sizeof(*alpha_intrinsics);
@@ -204,17 +206,17 @@ unsigned Function::getIntrinsicID() const {
return alpha_intrinsics[i].id;
break;
case 'l':
- if (getName() == "llvm.longjmp") return LLVMIntrinsic::longjmp;
+ if (getName() == "llvm.longjmp") return Intrinsic::longjmp;
break;
case 's':
- if (getName() == "llvm.setjmp") return LLVMIntrinsic::setjmp;
- if (getName() == "llvm.sigsetjmp") return LLVMIntrinsic::sigsetjmp;
- if (getName() == "llvm.siglongjmp") return LLVMIntrinsic::siglongjmp;
+ if (getName() == "llvm.setjmp") return Intrinsic::setjmp;
+ if (getName() == "llvm.sigsetjmp") return Intrinsic::sigsetjmp;
+ if (getName() == "llvm.siglongjmp") return Intrinsic::siglongjmp;
break;
case 'v':
- if (getName() == "llvm.va_copy") return LLVMIntrinsic::va_copy;
- if (getName() == "llvm.va_end") return LLVMIntrinsic::va_end;
- if (getName() == "llvm.va_start") return LLVMIntrinsic::va_start;
+ if (getName() == "llvm.va_copy") return Intrinsic::va_copy;
+ if (getName() == "llvm.va_end") return Intrinsic::va_end;
+ if (getName() == "llvm.va_start") return Intrinsic::va_start;
break;
}
// The "llvm." namespace is reserved!
@@ -257,3 +259,5 @@ void GlobalVariable::setName(const std::string &name, SymbolTable *ST) {
Value::setName(name);
if (P && getName() != "") P->getSymbolTable().insert(this);
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/InstrTypes.cpp b/llvm/lib/VMCore/InstrTypes.cpp
index ba1d4b71608..17e16fa733f 100644
--- a/llvm/lib/VMCore/InstrTypes.cpp
+++ b/llvm/lib/VMCore/InstrTypes.cpp
@@ -19,6 +19,8 @@
#include "llvm/Type.h"
#include <algorithm> // find
+namespace llvm {
+
//===----------------------------------------------------------------------===//
// TerminatorInst Class
//===----------------------------------------------------------------------===//
@@ -56,3 +58,5 @@ Value *PHINode::removeIncomingValue(unsigned Idx, bool DeletePHIIfEmpty) {
}
return Removed;
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/Instruction.cpp b/llvm/lib/VMCore/Instruction.cpp
index b72656bdc23..9ca2fedbf4f 100644
--- a/llvm/lib/VMCore/Instruction.cpp
+++ b/llvm/lib/VMCore/Instruction.cpp
@@ -16,6 +16,8 @@
#include "llvm/Type.h"
#include "Support/LeakDetector.h"
+namespace llvm {
+
Instruction::Instruction(const Type *ty, unsigned it, const std::string &Name,
Instruction *InsertBefore)
: User(ty, Value::InstructionVal, Name) {
@@ -163,3 +165,5 @@ bool Instruction::isTrapping(unsigned op) {
return false;
}
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/Module.cpp b/llvm/lib/VMCore/Module.cpp
index e62c83f67a6..6b15929506e 100644
--- a/llvm/lib/VMCore/Module.cpp
+++ b/llvm/lib/VMCore/Module.cpp
@@ -22,6 +22,8 @@
#include <cstdarg>
#include <map>
+namespace llvm {
+
Function *ilist_traits<Function>::createNode() {
FunctionType *FTy =
FunctionType::get(Type::VoidTy, std::vector<const Type*>(), false);
@@ -307,3 +309,5 @@ void Module::mutateConstantPointerRef(GlobalValue *OldGV, GlobalValue *NewGV) {
delete Ref;
}
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/ModuleProvider.cpp b/llvm/lib/VMCore/ModuleProvider.cpp
index ba324d08941..8be033622df 100644
--- a/llvm/lib/VMCore/ModuleProvider.cpp
+++ b/llvm/lib/VMCore/ModuleProvider.cpp
@@ -14,6 +14,8 @@
#include "llvm/ModuleProvider.h"
#include "llvm/Module.h"
+namespace llvm {
+
/// ctor - always have a valid Module
///
ModuleProvider::ModuleProvider() : TheModule(0) { }
@@ -35,3 +37,5 @@ Module* ModuleProvider::materializeModule() {
return TheModule;
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/Pass.cpp b/llvm/lib/VMCore/Pass.cpp
index 96ad3c94e98..b387fc35240 100644
--- a/llvm/lib/VMCore/Pass.cpp
+++ b/llvm/lib/VMCore/Pass.cpp
@@ -21,6 +21,8 @@
#include "Support/TypeInfo.h"
#include <set>
+namespace llvm {
+
// IncludeFile - Stub function used to help linking out.
IncludeFile::IncludeFile(void*) {}
@@ -467,3 +469,5 @@ void PassRegistrationListener::enumeratePasses() {
E = PassInfoMap->end(); I != E; ++I)
passEnumerate(I->second);
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/PassManagerT.h b/llvm/lib/VMCore/PassManagerT.h
index a715f5148e5..c5cac1d7fef 100644
--- a/llvm/lib/VMCore/PassManagerT.h
+++ b/llvm/lib/VMCore/PassManagerT.h
@@ -28,6 +28,9 @@
#include "Support/Timer.h"
#include <algorithm>
#include <iostream>
+
+namespace llvm {
+
class Annotable;
//===----------------------------------------------------------------------===//
@@ -792,4 +795,6 @@ inline bool PassManagerTraits<Function>::doFinalization(Module &M) {
return Changed;
}
+} // End llvm namespace
+
#endif
diff --git a/llvm/lib/VMCore/SlotCalculator.cpp b/llvm/lib/VMCore/SlotCalculator.cpp
index aef71763c44..c6e44e8266f 100644
--- a/llvm/lib/VMCore/SlotCalculator.cpp
+++ b/llvm/lib/VMCore/SlotCalculator.cpp
@@ -27,6 +27,8 @@
#include "Support/STLExtras.h"
#include <algorithm>
+namespace llvm {
+
#if 0
#define SC_DEBUG(X) std::cerr << X
#else
@@ -361,3 +363,5 @@ int SlotCalculator::doInsertValue(const Value *D) {
SC_DEBUG("]\n");
return (int)DestSlot;
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/SymbolTable.cpp b/llvm/lib/VMCore/SymbolTable.cpp
index 9452cdfec43..834d6198982 100644
--- a/llvm/lib/VMCore/SymbolTable.cpp
+++ b/llvm/lib/VMCore/SymbolTable.cpp
@@ -17,6 +17,8 @@
#include "Support/StringExtras.h"
#include <algorithm>
+namespace llvm {
+
#define DEBUG_SYMBOL_TABLE 0
#define DEBUG_ABSTYPE 0
@@ -354,3 +356,5 @@ void SymbolTable::dump() const {
std::cout << "Symbol table dump:\n";
for_each(begin(), end(), DumpPlane);
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/SymbolTableListTraitsImpl.h b/llvm/lib/VMCore/SymbolTableListTraitsImpl.h
index aec7520cef1..22d2e1d6c7a 100644
--- a/llvm/lib/VMCore/SymbolTableListTraitsImpl.h
+++ b/llvm/lib/VMCore/SymbolTableListTraitsImpl.h
@@ -19,6 +19,8 @@
#include "llvm/SymbolTableListTraits.h"
#include "llvm/SymbolTable.h"
+namespace llvm {
+
template<typename ValueSubClass, typename ItemParentClass,typename SymTabClass,
typename SubClass>
void SymbolTableListTraits<ValueSubClass,ItemParentClass,SymTabClass,SubClass>
@@ -94,4 +96,6 @@ void SymbolTableListTraits<ValueSubClass,ItemParentClass,SymTabClass,SubClass>
}
}
+} // End llvm namespace
+
#endif
diff --git a/llvm/lib/VMCore/Type.cpp b/llvm/lib/VMCore/Type.cpp
index ed468022cb8..9e33303b7f2 100644
--- a/llvm/lib/VMCore/Type.cpp
+++ b/llvm/lib/VMCore/Type.cpp
@@ -18,6 +18,8 @@
#include "Support/STLExtras.h"
#include <algorithm>
+namespace llvm {
+
// DEBUG_MERGE_TYPES - Enable this #define to see how and when derived types are
// created and later destroyed, all in an effort to make sure that there is only
// a single canonical version of a type.
@@ -1114,3 +1116,4 @@ void PointerType::typeBecameConcrete(const DerivedType *AbsTy) {
refineAbstractType(AbsTy, AbsTy);
}
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/Value.cpp b/llvm/lib/VMCore/Value.cpp
index 709ae3e9aed..f389eb0132f 100644
--- a/llvm/lib/VMCore/Value.cpp
+++ b/llvm/lib/VMCore/Value.cpp
@@ -18,6 +18,8 @@
#include "Support/LeakDetector.h"
#include <algorithm>
+namespace llvm {
+
//===----------------------------------------------------------------------===//
// Value Class
//===----------------------------------------------------------------------===//
@@ -107,3 +109,5 @@ void User::replaceUsesOfWith(Value *From, Value *To) {
setOperand(i, To); // Fix it now...
}
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp
index 14c14f3c089..1362eaab0f6 100644
--- a/llvm/lib/VMCore/Verifier.cpp
+++ b/llvm/lib/VMCore/Verifier.cpp
@@ -57,6 +57,8 @@
#include "Support/STLExtras.h"
#include <algorithm>
+namespace llvm {
+
namespace { // Anonymous namespace for class
struct Verifier : public FunctionPass, InstVisitor<Verifier> {
@@ -149,7 +151,7 @@ namespace { // Anonymous namespace for class
void visitReturnInst(ReturnInst &RI);
void visitUserOp1(Instruction &I);
void visitUserOp2(Instruction &I) { visitUserOp1(I); }
- void visitIntrinsicFunctionCall(LLVMIntrinsic::ID ID, CallInst &CI);
+ void visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI);
// CheckFailed - A check failed, so print out the condition and the message
// that failed. This provides a nice place to put a breakpoint if you want
@@ -168,7 +170,6 @@ namespace { // Anonymous namespace for class
};
RegisterPass<Verifier> X("verify", "Module Verifier");
-}
// Assert - We know that cond should be true, if not print an error message.
#define Assert(C, M) \
@@ -368,7 +369,7 @@ void Verifier::visitCallInst(CallInst &CI) {
CI.getOperand(i+1), FTy->getParamType(i));
if (Function *F = CI.getCalledFunction())
- if (LLVMIntrinsic::ID ID = (LLVMIntrinsic::ID)F->getIntrinsicID())
+ if (Intrinsic::ID ID = (Intrinsic::ID)F->getIntrinsicID())
visitIntrinsicFunctionCall(ID, CI);
visitInstruction(CI);
@@ -500,7 +501,7 @@ void Verifier::visitInstruction(Instruction &I) {
}
/// visitIntrinsicFunction - Allow intrinsics to be verified in different ways.
-void Verifier::visitIntrinsicFunctionCall(LLVMIntrinsic::ID ID, CallInst &CI) {
+void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
Function *IF = CI.getCalledFunction();
const FunctionType *FT = IF->getFunctionType();
Assert1(IF->isExternal(), "Intrinsic functions should never be defined!", IF);
@@ -509,37 +510,37 @@ void Verifier::visitIntrinsicFunctionCall(LLVMIntrinsic::ID ID, CallInst &CI) {
// FIXME: this should check the return type of each intrinsic as well, also
// arguments!
switch (ID) {
- case LLVMIntrinsic::va_start:
+ case Intrinsic::va_start:
Assert1(CI.getParent()->getParent()->getFunctionType()->isVarArg(),
"llvm.va_start intrinsic may only occur in function with variable"
" args!", &CI);
NumArgs = 0;
break;
- case LLVMIntrinsic::va_end: NumArgs = 1; break;
- case LLVMIntrinsic::va_copy: NumArgs = 1; break;
+ case Intrinsic::va_end: NumArgs = 1; break;
+ case Intrinsic::va_copy: NumArgs = 1; break;
- case LLVMIntrinsic::setjmp: NumArgs = 1; break;
- case LLVMIntrinsic::longjmp: NumArgs = 2; break;
- case LLVMIntrinsic::sigsetjmp: NumArgs = 2; break;
- case LLVMIntrinsic::siglongjmp: NumArgs = 2; break;
+ case Intrinsic::setjmp: NumArgs = 1; break;
+ case Intrinsic::longjmp: NumArgs = 2; break;
+ case Intrinsic::sigsetjmp: NumArgs = 2; break;
+ case Intrinsic::siglongjmp: NumArgs = 2; break;
- case LLVMIntrinsic::alpha_ctlz: NumArgs = 1; break;
- case LLVMIntrinsic::alpha_cttz: NumArgs = 1; break;
- case LLVMIntrinsic::alpha_ctpop: NumArgs = 1; break;
- case LLVMIntrinsic::alpha_umulh: NumArgs = 2; break;
- case LLVMIntrinsic::alpha_vecop: NumArgs = 4; break;
- case LLVMIntrinsic::alpha_pup: NumArgs = 3; break;
- case LLVMIntrinsic::alpha_bytezap: NumArgs = 2; break;
- case LLVMIntrinsic::alpha_bytemanip: NumArgs = 3; break;
- case LLVMIntrinsic::alpha_dfpbop: NumArgs = 3; break;
- case LLVMIntrinsic::alpha_dfpuop: NumArgs = 2; break;
- case LLVMIntrinsic::alpha_unordered: NumArgs = 2; break;
- case LLVMIntrinsic::alpha_uqtodfp: NumArgs = 2; break;
- case LLVMIntrinsic::alpha_uqtosfp: NumArgs = 2; break;
- case LLVMIntrinsic::alpha_dfptosq: NumArgs = 2; break;
- case LLVMIntrinsic::alpha_sfptosq: NumArgs = 2; break;
-
- case LLVMIntrinsic::not_intrinsic:
+ case Intrinsic::alpha_ctlz: NumArgs = 1; break;
+ case Intrinsic::alpha_cttz: NumArgs = 1; break;
+ case Intrinsic::alpha_ctpop: NumArgs = 1; break;
+ case Intrinsic::alpha_umulh: NumArgs = 2; break;
+ case Intrinsic::alpha_vecop: NumArgs = 4; break;
+ case Intrinsic::alpha_pup: NumArgs = 3; break;
+ case Intrinsic::alpha_bytezap: NumArgs = 2; break;
+ case Intrinsic::alpha_bytemanip: NumArgs = 3; break;
+ case Intrinsic::alpha_dfpbop: NumArgs = 3; break;
+ case Intrinsic::alpha_dfpuop: NumArgs = 2; break;
+ case Intrinsic::alpha_unordered: NumArgs = 2; break;
+ case Intrinsic::alpha_uqtodfp: NumArgs = 2; break;
+ case Intrinsic::alpha_uqtosfp: NumArgs = 2; break;
+ case Intrinsic::alpha_dfptosq: NumArgs = 2; break;
+ case Intrinsic::alpha_sfptosq: NumArgs = 2; break;
+
+ case Intrinsic::not_intrinsic:
assert(0 && "Invalid intrinsic!"); NumArgs = 0; break;
}
@@ -548,6 +549,7 @@ void Verifier::visitIntrinsicFunctionCall(LLVMIntrinsic::ID ID, CallInst &CI) {
"Illegal # arguments for intrinsic function!", IF);
}
+} // End anonymous namespace
//===----------------------------------------------------------------------===//
// Implement the public interfaces to this file...
@@ -585,3 +587,5 @@ bool verifyModule(const Module &M) {
PM.run((Module&)M);
return V->Broken;
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/iBranch.cpp b/llvm/lib/VMCore/iBranch.cpp
index bcba7145cc0..59dc303d701 100644
--- a/llvm/lib/VMCore/iBranch.cpp
+++ b/llvm/lib/VMCore/iBranch.cpp
@@ -16,6 +16,8 @@
#include "llvm/BasicBlock.h"
#include "llvm/Type.h"
+namespace llvm {
+
BranchInst::BranchInst(BasicBlock *True, BasicBlock *False, Value *Cond,
Instruction *InsertBefore)
: TerminatorInst(Instruction::Br, InsertBefore) {
@@ -49,3 +51,5 @@ BranchInst::BranchInst(const BranchInst &BI) : TerminatorInst(Instruction::Br) {
Operands.push_back(Use(BI.Operands[2], this));
}
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/iCall.cpp b/llvm/lib/VMCore/iCall.cpp
index b99c9e7bb3f..c385afc778b 100644
--- a/llvm/lib/VMCore/iCall.cpp
+++ b/llvm/lib/VMCore/iCall.cpp
@@ -17,6 +17,8 @@
#include "llvm/DerivedTypes.h"
#include "llvm/Function.h"
+namespace llvm {
+
//===----------------------------------------------------------------------===//
// CallInst Implementation
//===----------------------------------------------------------------------===//
@@ -144,8 +146,12 @@ Function *InvokeInst::getCalledFunction() {
return 0;
}
+} // End llvm namespace
+
#include "llvm/Support/CallSite.h"
+namespace llvm {
+
Function *CallSite::getCalledFunction() const {
Value *Callee = getCalledValue();
if (Function *F = dyn_cast<Function>(Callee))
@@ -155,3 +161,4 @@ Function *CallSite::getCalledFunction() const {
return 0;
}
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/iMemory.cpp b/llvm/lib/VMCore/iMemory.cpp
index 75309ad8dc0..c1a06576cd4 100644
--- a/llvm/lib/VMCore/iMemory.cpp
+++ b/llvm/lib/VMCore/iMemory.cpp
@@ -15,6 +15,8 @@
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
+using namespace llvm;
+
AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy,
const std::string &Name, Instruction *InsertBef)
: Instruction(PointerType::get(Ty), iTy, Name, InsertBef) {
diff --git a/llvm/lib/VMCore/iOperators.cpp b/llvm/lib/VMCore/iOperators.cpp
index d8932901981..79fac335fe5 100644
--- a/llvm/lib/VMCore/iOperators.cpp
+++ b/llvm/lib/VMCore/iOperators.cpp
@@ -16,6 +16,8 @@
#include "llvm/Constants.h"
#include "llvm/BasicBlock.h"
+namespace llvm {
+
//===----------------------------------------------------------------------===//
// BinaryOperator Class
//===----------------------------------------------------------------------===//
@@ -194,3 +196,5 @@ Instruction::BinaryOps SetCondInst::getSwappedCondition(BinaryOps Opcode) {
case SetLE: return SetGE;
}
}
+
+} // End llvm namespace
diff --git a/llvm/lib/VMCore/iSwitch.cpp b/llvm/lib/VMCore/iSwitch.cpp
index e6a4f48ef49..4386b7b837c 100644
--- a/llvm/lib/VMCore/iSwitch.cpp
+++ b/llvm/lib/VMCore/iSwitch.cpp
@@ -14,6 +14,8 @@
#include "llvm/iTerminators.h"
#include "llvm/BasicBlock.h"
+namespace llvm {
+
SwitchInst::SwitchInst(Value *V, BasicBlock *DefaultDest,
Instruction *InsertBefore)
: TerminatorInst(Instruction::Switch, InsertBefore) {
@@ -48,3 +50,5 @@ void SwitchInst::removeCase(unsigned idx) {
assert(idx*2 < Operands.size() && "Successor index out of range!!!");
Operands.erase(Operands.begin()+idx*2, Operands.begin()+(idx+1)*2);
}
+
+} // End llvm namespace
OpenPOWER on IntegriCloud