From 5a96f93573439be771ce9609fa2a5754c94485b6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 29 Dec 2009 07:12:03 +0000 Subject: [PATCH] sink twine.h down out of Value.h. It is annoying that you need to #include Twine.h just to give a twine a default value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92247 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Argument.h | 1 + include/llvm/BasicBlock.h | 1 + include/llvm/GlobalAlias.h | 1 + include/llvm/GlobalValue.h | 2 +- include/llvm/GlobalVariable.h | 1 + include/llvm/InstrTypes.h | 3 ++- include/llvm/Value.h | 2 +- 7 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/llvm/Argument.h b/include/llvm/Argument.h index ca54f48c36f..71c001fbe18 100644 --- a/include/llvm/Argument.h +++ b/include/llvm/Argument.h @@ -17,6 +17,7 @@ #include "llvm/Value.h" #include "llvm/Attributes.h" #include "llvm/ADT/ilist_node.h" +#include "llvm/ADT/Twine.h" namespace llvm { diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h index 1add14402ba..e358f91f90a 100644 --- a/include/llvm/BasicBlock.h +++ b/include/llvm/BasicBlock.h @@ -17,6 +17,7 @@ #include "llvm/Instruction.h" #include "llvm/SymbolTableListTraits.h" #include "llvm/ADT/ilist.h" +#include "llvm/ADT/Twine.h" #include "llvm/System/DataTypes.h" namespace llvm { diff --git a/include/llvm/GlobalAlias.h b/include/llvm/GlobalAlias.h index 9b3f4505697..9867c518c89 100644 --- a/include/llvm/GlobalAlias.h +++ b/include/llvm/GlobalAlias.h @@ -18,6 +18,7 @@ #include "llvm/GlobalValue.h" #include "llvm/OperandTraits.h" #include "llvm/ADT/ilist_node.h" +#include "llvm/ADT/Twine.h" namespace llvm { diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h index b8d219c7266..9875a833100 100644 --- a/include/llvm/GlobalValue.h +++ b/include/llvm/GlobalValue.h @@ -56,7 +56,7 @@ public: protected: GlobalValue(const Type *ty, ValueTy vty, Use *Ops, unsigned NumOps, - LinkageTypes linkage, const Twine &Name = "") + LinkageTypes linkage, const Twine &Name) : Constant(ty, vty, Ops, NumOps), Parent(0), Linkage(linkage), Visibility(DefaultVisibility), Alignment(0) { setName(Name); diff --git a/include/llvm/GlobalVariable.h b/include/llvm/GlobalVariable.h index 68bd1b3eab1..633e8b4dc33 100644 --- a/include/llvm/GlobalVariable.h +++ b/include/llvm/GlobalVariable.h @@ -23,6 +23,7 @@ #include "llvm/GlobalValue.h" #include "llvm/OperandTraits.h" #include "llvm/ADT/ilist_node.h" +#include "llvm/ADT/Twine.h" namespace llvm { diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index ba0aeda7188..85aaa7f0592 100644 --- a/include/llvm/InstrTypes.h +++ b/include/llvm/InstrTypes.h @@ -20,6 +20,7 @@ #include "llvm/OperandTraits.h" #include "llvm/Operator.h" #include "llvm/DerivedTypes.h" +#include "llvm/ADT/Twine.h" namespace llvm { @@ -160,7 +161,7 @@ public: /// Instruction is allowed to be a dereferenced end iterator. /// static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2, - const Twine &Name = "", + const Twine &Name = Twine(), Instruction *InsertBefore = 0); /// Create() - Construct a binary instruction, given the opcode and the two diff --git a/include/llvm/Value.h b/include/llvm/Value.h index 975d660c216..1be6ffd4882 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -17,7 +17,6 @@ #include "llvm/AbstractTypeUser.h" #include "llvm/Use.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/Twine.h" #include "llvm/Support/Casting.h" #include @@ -43,6 +42,7 @@ class AssemblyAnnotationWriter; class ValueHandleBase; class LLVMContext; class MetadataContextImpl; +class Twine; //===----------------------------------------------------------------------===// // Value Class -- 2.34.1