diff options
author | David Blaikie <dblaikie@gmail.com> | 2011-12-20 02:50:00 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2011-12-20 02:50:00 +0000 |
commit | a379b181733b7ce77c9f336fd99e208d7c2a6f21 (patch) | |
tree | 3bc42509537bcbf114062994536709d63fe9bb92 /llvm/lib/VMCore/Constants.cpp | |
parent | 68e081d606c7e80baa01400a738e118d7bb165b2 (diff) | |
download | bcm5719-llvm-a379b181733b7ce77c9f336fd99e208d7c2a6f21.tar.gz bcm5719-llvm-a379b181733b7ce77c9f336fd99e208d7c2a6f21.zip |
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
llvm-svn: 146960
Diffstat (limited to 'llvm/lib/VMCore/Constants.cpp')
-rw-r--r-- | llvm/lib/VMCore/Constants.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp index f17f9a26ca0..ba8c31b44a1 100644 --- a/llvm/lib/VMCore/Constants.cpp +++ b/llvm/lib/VMCore/Constants.cpp @@ -40,6 +40,8 @@ using namespace llvm; // Constant Class //===----------------------------------------------------------------------===// +void Constant::anchor() { } + bool Constant::isNegativeZeroValue() const { // Floating point values have an explicit -0.0 value. if (const ConstantFP *CFP = dyn_cast<ConstantFP>(this)) @@ -363,6 +365,8 @@ void Constant::removeDeadConstantUsers() const { // ConstantInt //===----------------------------------------------------------------------===// +void ConstantInt::anchor() { } + ConstantInt::ConstantInt(IntegerType *Ty, const APInt& V) : Constant(Ty, ConstantIntVal, 0, 0), Val(V) { assert(V.getBitWidth() == Ty->getBitWidth() && "Invalid constant for type"); @@ -486,6 +490,8 @@ static const fltSemantics *TypeToFloatSemantics(Type *Ty) { return &APFloat::PPCDoubleDouble; } +void ConstantFP::anchor() { } + /// get() - This returns a constant fp for the specified value in the /// specified type. This should only be used for simple constant values like /// 2.0/1.0 etc, that are known-valid both as double and as the target format. |