snip one more #include from Metadata.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-12-28 08:30:43 +00:00
parent fc252dae10
commit 5e9cd43423
3 changed files with 7 additions and 3 deletions

View File

@ -17,7 +17,6 @@
#define LLVM_METADATA_H #define LLVM_METADATA_H
#include "llvm/Value.h" #include "llvm/Value.h"
#include "llvm/Type.h"
#include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/ilist_node.h" #include "llvm/ADT/ilist_node.h"
@ -25,6 +24,7 @@ namespace llvm {
class Constant; class Constant;
class Instruction; class Instruction;
class LLVMContext; class LLVMContext;
class Module;
class MetadataContextImpl; class MetadataContextImpl;
template <typename T> class SmallVectorImpl; template <typename T> class SmallVectorImpl;
template<class PtrType, unsigned SmallSize> class SmallPtrSet; template<class PtrType, unsigned SmallSize> class SmallPtrSet;
@ -55,8 +55,7 @@ class MDString : public MetadataBase {
StringRef Str; StringRef Str;
protected: protected:
explicit MDString(LLVMContext &C, StringRef S) explicit MDString(LLVMContext &C, StringRef S);
: MetadataBase(Type::getMetadataTy(C), Value::MDStringVal), Str(S) {}
public: public:
static MDString *get(LLVMContext &Context, StringRef Str); static MDString *get(LLVMContext &Context, StringRef Str);

View File

@ -15,6 +15,7 @@
#include "llvm/Constants.h" #include "llvm/Constants.h"
#include "llvm/Function.h" #include "llvm/Function.h"
#include "llvm/InlineAsm.h" #include "llvm/InlineAsm.h"
#include "llvm/Type.h"
#include "llvm/Value.h" #include "llvm/Value.h"
#include "llvm/Assembly/Writer.h" #include "llvm/Assembly/Writer.h"
#include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunction.h"

View File

@ -29,6 +29,10 @@ using namespace llvm;
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// MDString implementation. // MDString implementation.
// //
MDString::MDString(LLVMContext &C, StringRef S)
: MetadataBase(Type::getMetadataTy(C), Value::MDStringVal), Str(S) {}
MDString *MDString::get(LLVMContext &Context, StringRef Str) { MDString *MDString::get(LLVMContext &Context, StringRef Str) {
LLVMContextImpl *pImpl = Context.pImpl; LLVMContextImpl *pImpl = Context.pImpl;
StringMapEntry<MDString *> &Entry = StringMapEntry<MDString *> &Entry =