Prechádzať zdrojové kódy

Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8

Dmitri Gribenko 12 rokov pred
rodič
commit
cfa88f8939
100 zmenil súbory, kde vykonal 312 pridanie a 327 odobranie
  1. 1 1
      examples/clang-interpreter/main.cpp
  2. 1 1
      include/clang/AST/Attr.h
  3. 13 13
      include/clang/AST/Comment.h
  4. 8 9
      include/clang/AST/Decl.h
  5. 3 3
      include/clang/AST/DeclBase.h
  6. 1 1
      include/clang/AST/DeclTemplate.h
  7. 5 5
      include/clang/AST/Expr.h
  8. 1 1
      include/clang/AST/ExprCXX.h
  9. 2 2
      include/clang/AST/ExprObjC.h
  10. 2 1
      include/clang/AST/LambdaMangleContext.h
  11. 3 3
      include/clang/AST/Stmt.h
  12. 4 4
      include/clang/AST/StmtCXX.h
  13. 3 4
      include/clang/ASTMatchers/ASTMatchers.h
  14. 3 3
      include/clang/ASTMatchers/ASTMatchersInternal.h
  15. 1 1
      include/clang/Analysis/Analyses/ThreadSafety.h
  16. 2 2
      include/clang/Analysis/Analyses/UninitializedValues.h
  17. 3 3
      include/clang/Analysis/CallGraph.h
  18. 1 1
      include/clang/Analysis/ProgramPoint.h
  19. 3 7
      include/clang/Basic/DiagnosticIDs.h
  20. 2 1
      include/clang/Basic/DiagnosticOptions.h
  21. 8 9
      include/clang/Basic/Module.h
  22. 1 1
      include/clang/Basic/PartialDiagnostic.h
  23. 1 1
      include/clang/Basic/SourceManager.h
  24. 1 1
      include/clang/Basic/TargetInfo.h
  25. 1 3
      include/clang/Driver/Driver.h
  26. 3 2
      include/clang/Frontend/LayoutOverrideSource.h
  27. 1 1
      include/clang/Frontend/LogDiagnosticPrinter.h
  28. 2 1
      include/clang/Frontend/SerializedDiagnosticPrinter.h
  29. 1 1
      include/clang/Frontend/TextDiagnosticPrinter.h
  30. 3 3
      include/clang/Lex/HeaderSearch.h
  31. 1 1
      include/clang/Lex/HeaderSearchOptions.h
  32. 1 2
      include/clang/Lex/ModuleLoader.h
  33. 1 1
      include/clang/Lex/ModuleMap.h
  34. 3 4
      include/clang/Lex/Preprocessor.h
  35. 3 3
      include/clang/Lex/PreprocessorOptions.h
  36. 3 3
      include/clang/Parse/Parser.h
  37. 1 1
      include/clang/Sema/DeclSpec.h
  38. 3 4
      include/clang/Sema/DelayedDiagnostic.h
  39. 1 1
      include/clang/Sema/MultiplexExternalSemaSource.h
  40. 1 1
      include/clang/Sema/Overload.h
  41. 2 2
      include/clang/Sema/ScopeInfo.h
  42. 21 21
      include/clang/Sema/Sema.h
  43. 3 3
      include/clang/Sema/TypoCorrection.h
  44. 11 13
      include/clang/Serialization/ASTReader.h
  45. 2 2
      include/clang/Serialization/ASTWriter.h
  46. 1 1
      include/clang/Serialization/ModuleManager.h
  47. 3 3
      include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
  48. 2 2
      include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
  49. 1 1
      include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
  50. 3 3
      include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
  51. 6 6
      include/clang/StaticAnalyzer/Core/Checker.h
  52. 1 1
      include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
  53. 3 3
      include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
  54. 1 1
      include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
  55. 1 1
      include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
  56. 1 1
      include/clang/Tooling/CommonOptionsParser.h
  57. 1 1
      include/clang/Tooling/CompilationDatabase.h
  58. 1 1
      include/clang/Tooling/FileMatchTrie.h
  59. 1 1
      include/clang/Tooling/JSONCompilationDatabase.h
  60. 8 8
      include/clang/Tooling/Refactoring.h
  61. 3 3
      include/clang/Tooling/Tooling.h
  62. 2 2
      lib/ARCMigrate/ARCMT.cpp
  63. 4 4
      lib/ARCMigrate/ObjCMT.cpp
  64. 2 2
      lib/ARCMigrate/TransProtectedScope.cpp
  65. 2 2
      lib/AST/ASTDiagnostic.cpp
  66. 1 1
      lib/AST/ASTDumper.cpp
  67. 15 15
      lib/AST/ASTImporter.cpp
  68. 1 1
      lib/AST/CommentDumper.cpp
  69. 3 3
      lib/AST/CommentSema.cpp
  70. 7 7
      lib/AST/Decl.cpp
  71. 4 4
      lib/AST/DeclBase.cpp
  72. 2 2
      lib/AST/DeclTemplate.cpp
  73. 2 2
      lib/AST/DumpXML.cpp
  74. 3 3
      lib/AST/Expr.cpp
  75. 1 1
      lib/AST/ExprCXX.cpp
  76. 14 15
      lib/AST/ExprConstant.cpp
  77. 1 1
      lib/AST/ItaniumMangle.cpp
  78. 4 4
      lib/ASTMatchers/ASTMatchFinder.cpp
  79. 2 2
      lib/Analysis/ReachableCode.cpp
  80. 1 1
      lib/Analysis/ThreadSafety.cpp
  81. 2 2
      lib/Analysis/UninitializedValues.cpp
  82. 4 4
      lib/Basic/Diagnostic.cpp
  83. 5 7
      lib/Basic/DiagnosticIDs.cpp
  84. 6 6
      lib/Basic/Module.cpp
  85. 2 2
      lib/Basic/Targets.cpp
  86. 2 2
      lib/CodeGen/CGBlocks.h
  87. 2 2
      lib/CodeGen/CGBuiltin.cpp
  88. 1 1
      lib/CodeGen/CGCUDANV.cpp
  89. 0 2
      lib/CodeGen/CGCall.h
  90. 1 1
      lib/CodeGen/CGException.cpp
  91. 9 9
      lib/CodeGen/CGExpr.cpp
  92. 1 1
      lib/CodeGen/CGExprConstant.cpp
  93. 2 2
      lib/CodeGen/CGExprScalar.cpp
  94. 1 1
      lib/CodeGen/CGObjC.cpp
  95. 4 4
      lib/CodeGen/CGObjCGNU.cpp
  96. 11 11
      lib/CodeGen/CGObjCMac.cpp
  97. 1 1
      lib/CodeGen/CodeGenAction.cpp
  98. 4 4
      lib/CodeGen/CodeGenFunction.cpp
  99. 3 3
      lib/CodeGen/CodeGenFunction.h
  100. 2 2
      lib/CodeGen/CodeGenModule.cpp

+ 1 - 1
examples/clang-interpreter/main.cpp

@@ -81,7 +81,7 @@ int main(int argc, const char **argv, char * const *envp) {
   // FIXME: This is a hack to try to force the driver to do something we can
   // FIXME: This is a hack to try to force the driver to do something we can
   // recognize. We need to extend the driver library to support this use model
   // recognize. We need to extend the driver library to support this use model
   // (basically, exactly one input, and the operation mode is hard wired).
   // (basically, exactly one input, and the operation mode is hard wired).
-  llvm::SmallVector<const char *, 16> Args(argv, argv + argc);
+  SmallVector<const char *, 16> Args(argv, argv + argc);
   Args.push_back("-fsyntax-only");
   Args.push_back("-fsyntax-only");
   OwningPtr<Compilation> C(TheDriver.BuildCompilation(Args));
   OwningPtr<Compilation> C(TheDriver.BuildCompilation(Args));
   if (!C)
   if (!C)

+ 1 - 1
include/clang/AST/Attr.h

@@ -88,7 +88,7 @@ public:
   virtual bool isLateParsed() const { return false; }
   virtual bool isLateParsed() const { return false; }
 
 
   // Pretty print this attribute.
   // Pretty print this attribute.
-  virtual void printPretty(llvm::raw_ostream &OS,
+  virtual void printPretty(raw_ostream &OS,
                            const PrintingPolicy &Policy) const = 0;
                            const PrintingPolicy &Policy) const = 0;
 };
 };
 
 

+ 13 - 13
include/clang/AST/Comment.h

@@ -172,7 +172,7 @@ public:
 
 
   LLVM_ATTRIBUTE_USED void dump() const;
   LLVM_ATTRIBUTE_USED void dump() const;
   LLVM_ATTRIBUTE_USED void dump(const ASTContext &Context) const;
   LLVM_ATTRIBUTE_USED void dump(const ASTContext &Context) const;
-  void dump(llvm::raw_ostream &OS, const CommandTraits *Traits,
+  void dump(raw_ostream &OS, const CommandTraits *Traits,
             const SourceManager *SM) const;
             const SourceManager *SM) const;
 
 
   SourceRange getSourceRange() const LLVM_READONLY { return Range; }
   SourceRange getSourceRange() const LLVM_READONLY { return Range; }
@@ -282,14 +282,14 @@ public:
 
 
 protected:
 protected:
   /// Command arguments.
   /// Command arguments.
-  llvm::ArrayRef<Argument> Args;
+  ArrayRef<Argument> Args;
 
 
 public:
 public:
   InlineCommandComment(SourceLocation LocBegin,
   InlineCommandComment(SourceLocation LocBegin,
                        SourceLocation LocEnd,
                        SourceLocation LocEnd,
                        unsigned CommandID,
                        unsigned CommandID,
                        RenderKind RK,
                        RenderKind RK,
-                       llvm::ArrayRef<Argument> Args) :
+                       ArrayRef<Argument> Args) :
       InlineContentComment(InlineCommandCommentKind, LocBegin, LocEnd),
       InlineContentComment(InlineCommandCommentKind, LocBegin, LocEnd),
       Args(Args) {
       Args(Args) {
     InlineCommandCommentBits.RenderKind = RK;
     InlineCommandCommentBits.RenderKind = RK;
@@ -504,10 +504,10 @@ public:
 
 
 /// A single paragraph that contains inline content.
 /// A single paragraph that contains inline content.
 class ParagraphComment : public BlockContentComment {
 class ParagraphComment : public BlockContentComment {
-  llvm::ArrayRef<InlineContentComment *> Content;
+  ArrayRef<InlineContentComment *> Content;
 
 
 public:
 public:
-  ParagraphComment(llvm::ArrayRef<InlineContentComment *> Content) :
+  ParagraphComment(ArrayRef<InlineContentComment *> Content) :
       BlockContentComment(ParagraphCommentKind,
       BlockContentComment(ParagraphCommentKind,
                           SourceLocation(),
                           SourceLocation(),
                           SourceLocation()),
                           SourceLocation()),
@@ -565,7 +565,7 @@ public:
 
 
 protected:
 protected:
   /// Word-like arguments.
   /// Word-like arguments.
-  llvm::ArrayRef<Argument> Args;
+  ArrayRef<Argument> Args;
 
 
   /// Paragraph argument.
   /// Paragraph argument.
   ParagraphComment *Paragraph;
   ParagraphComment *Paragraph;
@@ -633,7 +633,7 @@ public:
     return Args[Idx].Range;
     return Args[Idx].Range;
   }
   }
 
 
-  void setArgs(llvm::ArrayRef<Argument> A) {
+  void setArgs(ArrayRef<Argument> A) {
     Args = A;
     Args = A;
     if (Args.size() > 0) {
     if (Args.size() > 0) {
       SourceLocation NewLocEnd = Args.back().Range.getEnd();
       SourceLocation NewLocEnd = Args.back().Range.getEnd();
@@ -746,7 +746,7 @@ private:
   /// For C:  Position = { 0 }
   /// For C:  Position = { 0 }
   /// For TT: Position = { 1 }
   /// For TT: Position = { 1 }
   /// For T:  Position = { 1, 0 }
   /// For T:  Position = { 1, 0 }
-  llvm::ArrayRef<unsigned> Position;
+  ArrayRef<unsigned> Position;
 
 
 public:
 public:
   TParamCommandComment(SourceLocation LocBegin,
   TParamCommandComment(SourceLocation LocBegin,
@@ -826,7 +826,7 @@ class VerbatimBlockComment : public BlockCommandComment {
 protected:
 protected:
   StringRef CloseName;
   StringRef CloseName;
   SourceLocation CloseNameLocBegin;
   SourceLocation CloseNameLocBegin;
-  llvm::ArrayRef<VerbatimBlockLineComment *> Lines;
+  ArrayRef<VerbatimBlockLineComment *> Lines;
 
 
 public:
 public:
   VerbatimBlockComment(SourceLocation LocBegin,
   VerbatimBlockComment(SourceLocation LocBegin,
@@ -853,7 +853,7 @@ public:
     CloseNameLocBegin = LocBegin;
     CloseNameLocBegin = LocBegin;
   }
   }
 
 
-  void setLines(llvm::ArrayRef<VerbatimBlockLineComment *> L) {
+  void setLines(ArrayRef<VerbatimBlockLineComment *> L) {
     Lines = L;
     Lines = L;
   }
   }
 
 
@@ -1021,11 +1021,11 @@ struct DeclInfo {
 
 
 /// A full comment attached to a declaration, contains block content.
 /// A full comment attached to a declaration, contains block content.
 class FullComment : public Comment {
 class FullComment : public Comment {
-  llvm::ArrayRef<BlockContentComment *> Blocks;
+  ArrayRef<BlockContentComment *> Blocks;
   DeclInfo *ThisDeclInfo;
   DeclInfo *ThisDeclInfo;
 
 
 public:
 public:
-  FullComment(llvm::ArrayRef<BlockContentComment *> Blocks, DeclInfo *D) :
+  FullComment(ArrayRef<BlockContentComment *> Blocks, DeclInfo *D) :
       Comment(FullCommentKind, SourceLocation(), SourceLocation()),
       Comment(FullCommentKind, SourceLocation(), SourceLocation()),
       Blocks(Blocks), ThisDeclInfo(D) {
       Blocks(Blocks), ThisDeclInfo(D) {
     if (Blocks.empty())
     if (Blocks.empty())
@@ -1062,7 +1062,7 @@ public:
     return ThisDeclInfo;
     return ThisDeclInfo;
   }
   }
   
   
-  llvm::ArrayRef<BlockContentComment *> getBlocks() const { return Blocks; }
+  ArrayRef<BlockContentComment *> getBlocks() const { return Blocks; }
   
   
 };
 };
 } // end namespace comments
 } // end namespace comments

+ 8 - 9
include/clang/AST/Decl.h

@@ -1093,8 +1093,7 @@ public:
   /// not a constant expression. Returns a pointer to the value if evaluation
   /// not a constant expression. Returns a pointer to the value if evaluation
   /// succeeded, 0 otherwise.
   /// succeeded, 0 otherwise.
   APValue *evaluateValue() const;
   APValue *evaluateValue() const;
-  APValue *evaluateValue(
-    llvm::SmallVectorImpl<PartialDiagnosticAt> &Notes) const;
+  APValue *evaluateValue(SmallVectorImpl<PartialDiagnosticAt> &Notes) const;
 
 
   /// \brief Return the already-evaluated value of this variable's
   /// \brief Return the already-evaluated value of this variable's
   /// initializer, or NULL if the value is not yet known. Returns pointer
   /// initializer, or NULL if the value is not yet known. Returns pointer
@@ -1457,7 +1456,7 @@ private:
   /// DeclsInPrototypeScope - Array of pointers to NamedDecls for
   /// DeclsInPrototypeScope - Array of pointers to NamedDecls for
   /// decls defined in the function prototype that are not parameters. E.g.
   /// decls defined in the function prototype that are not parameters. E.g.
   /// 'enum Y' in 'void f(enum Y {AA} x) {}'.
   /// 'enum Y' in 'void f(enum Y {AA} x) {}'.
-  llvm::ArrayRef<NamedDecl*> DeclsInPrototypeScope;
+  ArrayRef<NamedDecl *> DeclsInPrototypeScope;
 
 
   LazyDeclStmtPtr Body;
   LazyDeclStmtPtr Body;
 
 
@@ -1548,7 +1547,7 @@ private:
   void setInstantiationOfMemberFunction(ASTContext &C, FunctionDecl *FD,
   void setInstantiationOfMemberFunction(ASTContext &C, FunctionDecl *FD,
                                         TemplateSpecializationKind TSK);
                                         TemplateSpecializationKind TSK);
 
 
-  void setParams(ASTContext &C, llvm::ArrayRef<ParmVarDecl *> NewParamInfo);
+  void setParams(ASTContext &C, ArrayRef<ParmVarDecl *> NewParamInfo);
 
 
 protected:
 protected:
   FunctionDecl(Kind DK, DeclContext *DC, SourceLocation StartLoc,
   FunctionDecl(Kind DK, DeclContext *DC, SourceLocation StartLoc,
@@ -1835,14 +1834,14 @@ public:
     assert(i < getNumParams() && "Illegal param #");
     assert(i < getNumParams() && "Illegal param #");
     return ParamInfo[i];
     return ParamInfo[i];
   }
   }
-  void setParams(llvm::ArrayRef<ParmVarDecl *> NewParamInfo) {
+  void setParams(ArrayRef<ParmVarDecl *> NewParamInfo) {
     setParams(getASTContext(), NewParamInfo);
     setParams(getASTContext(), NewParamInfo);
   }
   }
 
 
-  const llvm::ArrayRef<NamedDecl*> &getDeclsInPrototypeScope() const {
+  const ArrayRef<NamedDecl *> &getDeclsInPrototypeScope() const {
     return DeclsInPrototypeScope;
     return DeclsInPrototypeScope;
   }
   }
-  void setDeclsInPrototypeScope(llvm::ArrayRef<NamedDecl *> NewDecls);
+  void setDeclsInPrototypeScope(ArrayRef<NamedDecl *> NewDecls);
 
 
   /// getMinRequiredArguments - Returns the minimum number of arguments
   /// getMinRequiredArguments - Returns the minimum number of arguments
   /// needed to call this function. This may be fewer than the number of
   /// needed to call this function. This may be fewer than the number of
@@ -3182,7 +3181,7 @@ public:
     assert(i < getNumParams() && "Illegal param #");
     assert(i < getNumParams() && "Illegal param #");
     return ParamInfo[i];
     return ParamInfo[i];
   }
   }
-  void setParams(llvm::ArrayRef<ParmVarDecl *> NewParamInfo);
+  void setParams(ArrayRef<ParmVarDecl *> NewParamInfo);
 
 
   /// hasCaptures - True if this block (or its nested blocks) captures
   /// hasCaptures - True if this block (or its nested blocks) captures
   /// anything of local storage from its enclosing scopes.
   /// anything of local storage from its enclosing scopes.
@@ -3323,7 +3322,7 @@ void Redeclarable<decl_type>::setPreviousDeclaration(decl_type *PrevDecl) {
     First = PrevDecl->getFirstDeclaration();
     First = PrevDecl->getFirstDeclaration();
     assert(First->RedeclLink.NextIsLatest() && "Expected first");
     assert(First->RedeclLink.NextIsLatest() && "Expected first");
     decl_type *MostRecent = First->RedeclLink.getNext();
     decl_type *MostRecent = First->RedeclLink.getNext();
-    RedeclLink = PreviousDeclLink(llvm::cast<decl_type>(MostRecent));
+    RedeclLink = PreviousDeclLink(cast<decl_type>(MostRecent));
   } else {
   } else {
     // Make this first.
     // Make this first.
     First = static_cast<decl_type*>(this);
     First = static_cast<decl_type*>(this);

+ 3 - 3
include/clang/AST/DeclBase.h

@@ -904,7 +904,7 @@ public:
 
 
 typedef llvm::MutableArrayRef<NamedDecl*> DeclContextLookupResult;
 typedef llvm::MutableArrayRef<NamedDecl*> DeclContextLookupResult;
 
 
-typedef llvm::ArrayRef<NamedDecl*> DeclContextLookupConstResult;
+typedef ArrayRef<NamedDecl *> DeclContextLookupConstResult;
 
 
 /// DeclContext - This is used only as base class of specific decl types that
 /// DeclContext - This is used only as base class of specific decl types that
 /// can act as declaration contexts. These decls are (only the top classes
 /// can act as declaration contexts. These decls are (only the top classes
@@ -1151,7 +1151,7 @@ public:
   /// contexts that are semanticaly connected to this declaration context,
   /// contexts that are semanticaly connected to this declaration context,
   /// in source order, including this context (which may be the only result,
   /// in source order, including this context (which may be the only result,
   /// for non-namespace contexts).
   /// for non-namespace contexts).
-  void collectAllContexts(llvm::SmallVectorImpl<DeclContext *> &Contexts);
+  void collectAllContexts(SmallVectorImpl<DeclContext *> &Contexts);
 
 
   /// decl_iterator - Iterates through the declarations stored
   /// decl_iterator - Iterates through the declarations stored
   /// within this context.
   /// within this context.
@@ -1414,7 +1414,7 @@ public:
   /// usual relationship between a DeclContext and the external source.
   /// usual relationship between a DeclContext and the external source.
   /// See the ASTImporter for the (few, but important) use cases.
   /// See the ASTImporter for the (few, but important) use cases.
   void localUncachedLookup(DeclarationName Name,
   void localUncachedLookup(DeclarationName Name,
-                           llvm::SmallVectorImpl<NamedDecl *> &Results);
+                           SmallVectorImpl<NamedDecl *> &Results);
 
 
   /// @brief Makes a declaration visible within this context.
   /// @brief Makes a declaration visible within this context.
   ///
   ///

+ 1 - 1
include/clang/AST/DeclTemplate.h

@@ -1205,7 +1205,7 @@ public:
                                           unsigned P,
                                           unsigned P,
                                           IdentifierInfo *Id,
                                           IdentifierInfo *Id,
                                           TemplateParameterList *Params,
                                           TemplateParameterList *Params,
-                             llvm::ArrayRef<TemplateParameterList*> Expansions);
+                                 ArrayRef<TemplateParameterList *> Expansions);
 
 
   static TemplateTemplateParmDecl *CreateDeserialized(ASTContext &C,
   static TemplateTemplateParmDecl *CreateDeserialized(ASTContext &C,
                                                       unsigned ID);
                                                       unsigned ID);

+ 5 - 5
include/clang/AST/Expr.h

@@ -490,7 +490,7 @@ public:
   /// constexpr. Return false if the function can never produce a constant
   /// constexpr. Return false if the function can never produce a constant
   /// expression, along with diagnostics describing why not.
   /// expression, along with diagnostics describing why not.
   static bool isPotentialConstantExpr(const FunctionDecl *FD,
   static bool isPotentialConstantExpr(const FunctionDecl *FD,
-                                      llvm::SmallVectorImpl<
+                                      SmallVectorImpl<
                                         PartialDiagnosticAt> &Diags);
                                         PartialDiagnosticAt> &Diags);
 
 
   /// isConstantInitializer - Returns true if this expression can be emitted to
   /// isConstantInitializer - Returns true if this expression can be emitted to
@@ -510,7 +510,7 @@ public:
     /// foldable. If the expression is foldable, but not a constant expression,
     /// foldable. If the expression is foldable, but not a constant expression,
     /// the notes will describes why it isn't a constant expression. If the
     /// the notes will describes why it isn't a constant expression. If the
     /// expression *is* a constant expression, no notes will be produced.
     /// expression *is* a constant expression, no notes will be produced.
-    llvm::SmallVectorImpl<PartialDiagnosticAt> *Diag;
+    SmallVectorImpl<PartialDiagnosticAt> *Diag;
 
 
     EvalStatus() : HasSideEffects(false), Diag(0) {}
     EvalStatus() : HasSideEffects(false), Diag(0) {}
 
 
@@ -569,7 +569,7 @@ public:
   /// integer. This must be called on an expression that constant folds to an
   /// integer. This must be called on an expression that constant folds to an
   /// integer.
   /// integer.
   llvm::APSInt EvaluateKnownConstInt(const ASTContext &Ctx,
   llvm::APSInt EvaluateKnownConstInt(const ASTContext &Ctx,
-                  llvm::SmallVectorImpl<PartialDiagnosticAt> *Diag=0) const;
+                          SmallVectorImpl<PartialDiagnosticAt> *Diag=0) const;
 
 
   /// EvaluateAsLValue - Evaluate an expression to see if we can fold it to an
   /// EvaluateAsLValue - Evaluate an expression to see if we can fold it to an
   /// lvalue with link time known address, with no side-effects.
   /// lvalue with link time known address, with no side-effects.
@@ -581,7 +581,7 @@ public:
   /// notes will be produced if the expression is not a constant expression.
   /// notes will be produced if the expression is not a constant expression.
   bool EvaluateAsInitializer(APValue &Result, const ASTContext &Ctx,
   bool EvaluateAsInitializer(APValue &Result, const ASTContext &Ctx,
                              const VarDecl *VD,
                              const VarDecl *VD,
-                       llvm::SmallVectorImpl<PartialDiagnosticAt> &Notes) const;
+                             SmallVectorImpl<PartialDiagnosticAt> &Notes) const;
 
 
   /// \brief Enumeration used to describe the kind of Null pointer constant
   /// \brief Enumeration used to describe the kind of Null pointer constant
   /// returned from \c isNullPointerConstant().
   /// returned from \c isNullPointerConstant().
@@ -729,7 +729,7 @@ public:
     return const_cast<Expr*>(this)->IgnoreParenNoopCasts(Ctx);
     return const_cast<Expr*>(this)->IgnoreParenNoopCasts(Ctx);
   }
   }
 
 
-  static bool hasAnyTypeDependentArguments(llvm::ArrayRef<Expr *> Exprs);
+  static bool hasAnyTypeDependentArguments(ArrayRef<Expr *> Exprs);
 
 
   /// \brief For an expression of class type or pointer to class type,
   /// \brief For an expression of class type or pointer to class type,
   /// return the most derived class decl the expression is known to refer to.
   /// return the most derived class decl the expression is known to refer to.

+ 1 - 1
include/clang/AST/ExprCXX.h

@@ -3631,7 +3631,7 @@ public:
   static FunctionParmPackExpr *Create(ASTContext &Context, QualType T,
   static FunctionParmPackExpr *Create(ASTContext &Context, QualType T,
                                       ParmVarDecl *ParamPack,
                                       ParmVarDecl *ParamPack,
                                       SourceLocation NameLoc,
                                       SourceLocation NameLoc,
-                                      llvm::ArrayRef<Decl*> Params);
+                                      ArrayRef<Decl *> Params);
   static FunctionParmPackExpr *CreateEmpty(ASTContext &Context,
   static FunctionParmPackExpr *CreateEmpty(ASTContext &Context,
                                            unsigned NumParams);
                                            unsigned NumParams);
 
 

+ 2 - 2
include/clang/AST/ExprObjC.h

@@ -135,7 +135,7 @@ class ObjCArrayLiteral : public Expr {
   SourceRange Range;
   SourceRange Range;
   ObjCMethodDecl *ArrayWithObjectsMethod;
   ObjCMethodDecl *ArrayWithObjectsMethod;
   
   
-  ObjCArrayLiteral(llvm::ArrayRef<Expr *> Elements,
+  ObjCArrayLiteral(ArrayRef<Expr *> Elements,
                    QualType T, ObjCMethodDecl * Method,
                    QualType T, ObjCMethodDecl * Method,
                    SourceRange SR);
                    SourceRange SR);
   
   
@@ -144,7 +144,7 @@ class ObjCArrayLiteral : public Expr {
 
 
 public:
 public:
   static ObjCArrayLiteral *Create(ASTContext &C, 
   static ObjCArrayLiteral *Create(ASTContext &C, 
-                                  llvm::ArrayRef<Expr *> Elements,
+                                  ArrayRef<Expr *> Elements,
                                   QualType T, ObjCMethodDecl * Method,
                                   QualType T, ObjCMethodDecl * Method,
                                   SourceRange SR);
                                   SourceRange SR);
 
 

+ 2 - 1
include/clang/AST/LambdaMangleContext.h

@@ -14,6 +14,7 @@
 #ifndef LLVM_CLANG_LAMBDAMANGLECONTEXT_H
 #ifndef LLVM_CLANG_LAMBDAMANGLECONTEXT_H
 #define LLVM_CLANG_LAMBDAMANGLECONTEXT_H
 #define LLVM_CLANG_LAMBDAMANGLECONTEXT_H
 
 
+#include "clang/Basic/LLVM.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 
 
@@ -24,7 +25,7 @@ class FunctionProtoType;
 
 
 /// \brief Keeps track of the mangled names of lambda expressions within a
 /// \brief Keeps track of the mangled names of lambda expressions within a
 /// particular context.
 /// particular context.
-class LambdaMangleContext : public llvm::RefCountedBase<LambdaMangleContext> {
+class LambdaMangleContext : public RefCountedBase<LambdaMangleContext> {
   llvm::DenseMap<const FunctionProtoType *, unsigned> ManglingNumbers;
   llvm::DenseMap<const FunctionProtoType *, unsigned> ManglingNumbers;
   
   
 public:
 public:

+ 3 - 3
include/clang/AST/Stmt.h

@@ -1773,7 +1773,7 @@ public:
   }
   }
 
 
   CompoundStmt *getBlock() const {
   CompoundStmt *getBlock() const {
-    return llvm::cast<CompoundStmt>(Children[BLOCK]);
+    return cast<CompoundStmt>(Children[BLOCK]);
   }
   }
 
 
   child_range children() {
   child_range children() {
@@ -1808,7 +1808,7 @@ public:
   SourceLocation getFinallyLoc() const { return Loc; }
   SourceLocation getFinallyLoc() const { return Loc; }
   SourceLocation getEndLoc() const { return Block->getLocEnd(); }
   SourceLocation getEndLoc() const { return Block->getLocEnd(); }
 
 
-  CompoundStmt *getBlock() const { return llvm::cast<CompoundStmt>(Block); }
+  CompoundStmt *getBlock() const { return cast<CompoundStmt>(Block); }
 
 
   child_range children() {
   child_range children() {
     return child_range(&Block,&Block+1);
     return child_range(&Block,&Block+1);
@@ -1852,7 +1852,7 @@ public:
   bool getIsCXXTry() const { return IsCXXTry; }
   bool getIsCXXTry() const { return IsCXXTry; }
 
 
   CompoundStmt* getTryBlock() const {
   CompoundStmt* getTryBlock() const {
-    return llvm::cast<CompoundStmt>(Children[TRY]);
+    return cast<CompoundStmt>(Children[TRY]);
   }
   }
 
 
   Stmt *getHandler() const { return Children[HANDLER]; }
   Stmt *getHandler() const { return Children[HANDLER]; }

+ 4 - 4
include/clang/AST/StmtCXX.h

@@ -94,18 +94,18 @@ public:
   }
   }
 
 
   CompoundStmt *getTryBlock() {
   CompoundStmt *getTryBlock() {
-    return llvm::cast<CompoundStmt>(getStmts()[0]);
+    return cast<CompoundStmt>(getStmts()[0]);
   }
   }
   const CompoundStmt *getTryBlock() const {
   const CompoundStmt *getTryBlock() const {
-    return llvm::cast<CompoundStmt>(getStmts()[0]);
+    return cast<CompoundStmt>(getStmts()[0]);
   }
   }
 
 
   unsigned getNumHandlers() const { return NumHandlers; }
   unsigned getNumHandlers() const { return NumHandlers; }
   CXXCatchStmt *getHandler(unsigned i) {
   CXXCatchStmt *getHandler(unsigned i) {
-    return llvm::cast<CXXCatchStmt>(getStmts()[i + 1]);
+    return cast<CXXCatchStmt>(getStmts()[i + 1]);
   }
   }
   const CXXCatchStmt *getHandler(unsigned i) const {
   const CXXCatchStmt *getHandler(unsigned i) const {
-    return llvm::cast<CXXCatchStmt>(getStmts()[i + 1]);
+    return cast<CXXCatchStmt>(getStmts()[i + 1]);
   }
   }
 
 
   static bool classof(const Stmt *T) {
   static bool classof(const Stmt *T) {

+ 3 - 4
include/clang/ASTMatchers/ASTMatchers.h

@@ -1228,8 +1228,8 @@ inline internal::Matcher<Stmt> sizeOfExpr(
 AST_MATCHER_P(NamedDecl, hasName, std::string, Name) {
 AST_MATCHER_P(NamedDecl, hasName, std::string, Name) {
   assert(!Name.empty());
   assert(!Name.empty());
   const std::string FullNameString = "::" + Node.getQualifiedNameAsString();
   const std::string FullNameString = "::" + Node.getQualifiedNameAsString();
-  const llvm::StringRef FullName = FullNameString;
-  const llvm::StringRef Pattern = Name;
+  const StringRef FullName = FullNameString;
+  const StringRef Pattern = Name;
   if (Pattern.startswith("::")) {
   if (Pattern.startswith("::")) {
     return FullName == Pattern;
     return FullName == Pattern;
   } else {
   } else {
@@ -1705,8 +1705,7 @@ AST_MATCHER_P(DeclRefExpr, to, internal::Matcher<Decl>,
 AST_MATCHER_P(DeclRefExpr, throughUsingDecl,
 AST_MATCHER_P(DeclRefExpr, throughUsingDecl,
               internal::Matcher<UsingShadowDecl>, InnerMatcher) {
               internal::Matcher<UsingShadowDecl>, InnerMatcher) {
   const NamedDecl *FoundDecl = Node.getFoundDecl();
   const NamedDecl *FoundDecl = Node.getFoundDecl();
-  if (const UsingShadowDecl *UsingDecl =
-      llvm::dyn_cast<UsingShadowDecl>(FoundDecl))
+  if (const UsingShadowDecl *UsingDecl = dyn_cast<UsingShadowDecl>(FoundDecl))
     return InnerMatcher.matches(*UsingDecl, Finder, Builder);
     return InnerMatcher.matches(*UsingDecl, Finder, Builder);
   return false;
   return false;
 }
 }

+ 3 - 3
include/clang/ASTMatchers/ASTMatchersInternal.h

@@ -193,7 +193,7 @@ class ASTMatchFinder;
 /// current node and doesn't care about its children or descendants,
 /// current node and doesn't care about its children or descendants,
 /// implement SingleNodeMatcherInterface instead.
 /// implement SingleNodeMatcherInterface instead.
 template <typename T>
 template <typename T>
-class MatcherInterface : public llvm::RefCountedBaseVPTR {
+class MatcherInterface : public RefCountedBaseVPTR {
 public:
 public:
   virtual ~MatcherInterface() {}
   virtual ~MatcherInterface() {}
 
 
@@ -343,7 +343,7 @@ private:
     const Matcher<Base> From;
     const Matcher<Base> From;
   };
   };
 
 
-  llvm::IntrusiveRefCntPtr< MatcherInterface<T> > Implementation;
+  IntrusiveRefCntPtr< MatcherInterface<T> > Implementation;
 };  // class Matcher
 };  // class Matcher
 
 
 /// \brief A convenient helper for creating a Matcher<T> without specifying
 /// \brief A convenient helper for creating a Matcher<T> without specifying
@@ -676,7 +676,7 @@ public:
   virtual bool matches(const T &Node,
   virtual bool matches(const T &Node,
                        ASTMatchFinder *Finder,
                        ASTMatchFinder *Finder,
                        BoundNodesTreeBuilder *Builder) const {
                        BoundNodesTreeBuilder *Builder) const {
-    const To *InnerMatchValue = llvm::dyn_cast<To>(&Node);
+    const To *InnerMatchValue = dyn_cast<To>(&Node);
     return InnerMatchValue != NULL &&
     return InnerMatchValue != NULL &&
       InnerMatcher.matches(*InnerMatchValue, Finder, Builder);
       InnerMatcher.matches(*InnerMatchValue, Finder, Builder);
   }
   }

+ 1 - 1
include/clang/Analysis/Analyses/ThreadSafety.h

@@ -67,7 +67,7 @@ enum LockErrorKind {
 /// Handler class for thread safety warnings.
 /// Handler class for thread safety warnings.
 class ThreadSafetyHandler {
 class ThreadSafetyHandler {
 public:
 public:
-  typedef llvm::StringRef Name;
+  typedef StringRef Name;
   ThreadSafetyHandler() : IssueBetaWarnings(false) { }
   ThreadSafetyHandler() : IssueBetaWarnings(false) { }
   virtual ~ThreadSafetyHandler();
   virtual ~ThreadSafetyHandler();
 
 

+ 2 - 2
include/clang/Analysis/Analyses/UninitializedValues.h

@@ -43,7 +43,7 @@ private:
 
 
   /// This use is always uninitialized if it occurs after any of these branches
   /// This use is always uninitialized if it occurs after any of these branches
   /// is taken.
   /// is taken.
-  llvm::SmallVector<Branch, 2> UninitBranches;
+  SmallVector<Branch, 2> UninitBranches;
 
 
 public:
 public:
   UninitUse(const Expr *User, bool AlwaysUninit) :
   UninitUse(const Expr *User, bool AlwaysUninit) :
@@ -72,7 +72,7 @@ public:
            !branch_empty() ? Sometimes : Maybe;
            !branch_empty() ? Sometimes : Maybe;
   }
   }
 
 
-  typedef llvm::SmallVectorImpl<Branch>::const_iterator branch_iterator;
+  typedef SmallVectorImpl<Branch>::const_iterator branch_iterator;
   /// Branches which inevitably result in the variable being used uninitialized.
   /// Branches which inevitably result in the variable being used uninitialized.
   branch_iterator branch_begin() const { return UninitBranches.begin(); }
   branch_iterator branch_begin() const { return UninitBranches.begin(); }
   branch_iterator branch_end() const { return UninitBranches.end(); }
   branch_iterator branch_end() const { return UninitBranches.end(); }

+ 3 - 3
include/clang/Analysis/CallGraph.h

@@ -139,13 +139,13 @@ private:
   Decl *FD;
   Decl *FD;
 
 
   /// \brief The list of functions called from this node.
   /// \brief The list of functions called from this node.
-  llvm::SmallVector<CallRecord, 5> CalledFunctions;
+  SmallVector<CallRecord, 5> CalledFunctions;
 
 
 public:
 public:
   CallGraphNode(Decl *D) : FD(D) {}
   CallGraphNode(Decl *D) : FD(D) {}
 
 
-  typedef llvm::SmallVector<CallRecord, 5>::iterator iterator;
-  typedef llvm::SmallVector<CallRecord, 5>::const_iterator const_iterator;
+  typedef SmallVector<CallRecord, 5>::iterator iterator;
+  typedef SmallVector<CallRecord, 5>::const_iterator const_iterator;
 
 
   /// Iterators through all the callees/children of the node.
   /// Iterators through all the callees/children of the node.
   inline iterator begin() { return CalledFunctions.begin(); }
   inline iterator begin() { return CalledFunctions.begin(); }

+ 1 - 1
include/clang/Analysis/ProgramPoint.h

@@ -218,7 +218,7 @@ public:
   const Stmt *getStmt() const { return (const Stmt*) getData1(); }
   const Stmt *getStmt() const { return (const Stmt*) getData1(); }
 
 
   template <typename T>
   template <typename T>
-  const T* getStmtAs() const { return llvm::dyn_cast<T>(getStmt()); }
+  const T* getStmtAs() const { return dyn_cast<T>(getStmt()); }
 
 
   static bool classof(const ProgramPoint* Location) {
   static bool classof(const ProgramPoint* Location) {
     unsigned k = Location->getKind();
     unsigned k = Location->getKind();

+ 3 - 7
include/clang/Basic/DiagnosticIDs.h

@@ -19,10 +19,6 @@
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringRef.h"
 
 
-namespace llvm {
-  template<typename T, unsigned> class SmallVector;
-}
-
 namespace clang {
 namespace clang {
   class DiagnosticsEngine;
   class DiagnosticsEngine;
   class SourceLocation;
   class SourceLocation;
@@ -231,10 +227,10 @@ public:
   /// \param Diags [out] - On return, the diagnostics in the group.
   /// \param Diags [out] - On return, the diagnostics in the group.
   /// \returns True if the given group is unknown, false otherwise.
   /// \returns True if the given group is unknown, false otherwise.
   bool getDiagnosticsInGroup(StringRef Group,
   bool getDiagnosticsInGroup(StringRef Group,
-                             llvm::SmallVectorImpl<diag::kind> &Diags) const;
+                             SmallVectorImpl<diag::kind> &Diags) const;
 
 
   /// \brief Get the set of all diagnostic IDs.
   /// \brief Get the set of all diagnostic IDs.
-  void getAllDiagnostics(llvm::SmallVectorImpl<diag::kind> &Diags) const;
+  void getAllDiagnostics(SmallVectorImpl<diag::kind> &Diags) const;
 
 
   /// \brief Get the warning option with the closest edit distance to the given
   /// \brief Get the warning option with the closest edit distance to the given
   /// group name.
   /// group name.
@@ -245,7 +241,7 @@ private:
   ///
   ///
   /// \param Diags [out] - On return, the diagnostics in the group.
   /// \param Diags [out] - On return, the diagnostics in the group.
   void getDiagnosticsInGroup(const WarningOption *Group,
   void getDiagnosticsInGroup(const WarningOption *Group,
-                             llvm::SmallVectorImpl<diag::kind> &Diags) const;
+                             SmallVectorImpl<diag::kind> &Diags) const;
  
  
   /// \brief Based on the way the client configured the DiagnosticsEngine
   /// \brief Based on the way the client configured the DiagnosticsEngine
   /// object, classify the specified diagnostic ID into a Level, consumable by
   /// object, classify the specified diagnostic ID into a Level, consumable by

+ 2 - 1
include/clang/Basic/DiagnosticOptions.h

@@ -10,6 +10,7 @@
 #ifndef LLVM_CLANG_BASIC_DIAGNOSTICOPTIONS_H
 #ifndef LLVM_CLANG_BASIC_DIAGNOSTICOPTIONS_H
 #define LLVM_CLANG_BASIC_DIAGNOSTICOPTIONS_H
 #define LLVM_CLANG_BASIC_DIAGNOSTICOPTIONS_H
 
 
+#include "clang/Basic/LLVM.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 #include <string>
 #include <string>
 #include <vector>
 #include <vector>
@@ -25,7 +26,7 @@ enum OverloadsShown {
 
 
 /// DiagnosticOptions - Options for controlling the compiler diagnostics
 /// DiagnosticOptions - Options for controlling the compiler diagnostics
 /// engine.
 /// engine.
-class DiagnosticOptions : public llvm::RefCountedBase<DiagnosticOptions>{
+class DiagnosticOptions : public RefCountedBase<DiagnosticOptions>{
 public:
 public:
   enum TextDiagnosticFormat { Clang, Msvc, Vi };
   enum TextDiagnosticFormat { Clang, Msvc, Vi };
 
 

+ 8 - 9
include/clang/Basic/Module.h

@@ -38,8 +38,7 @@ class LangOptions;
 class TargetInfo;
 class TargetInfo;
   
   
 /// \brief Describes the name of a module.
 /// \brief Describes the name of a module.
-typedef llvm::SmallVector<std::pair<std::string, SourceLocation>, 2>
-  ModuleId;
+typedef SmallVector<std::pair<std::string, SourceLocation>, 2> ModuleId;
   
   
 /// \brief Describes a module or submodule.
 /// \brief Describes a module or submodule.
 class Module {
 class Module {
@@ -71,10 +70,10 @@ private:
   
   
 public:
 public:
   /// \brief The headers that are part of this module.
   /// \brief The headers that are part of this module.
-  llvm::SmallVector<const FileEntry *, 2> Headers;
+  SmallVector<const FileEntry *, 2> Headers;
 
 
   /// \brief The headers that are explicitly excluded from this module.
   /// \brief The headers that are explicitly excluded from this module.
-  llvm::SmallVector<const FileEntry *, 2> ExcludedHeaders;
+  SmallVector<const FileEntry *, 2> ExcludedHeaders;
 
 
   /// \brief The top-level headers associated with this module.
   /// \brief The top-level headers associated with this module.
   llvm::SmallSetVector<const FileEntry *, 2> TopHeaders;
   llvm::SmallSetVector<const FileEntry *, 2> TopHeaders;
@@ -84,7 +83,7 @@ public:
   /// If any of these features is not present, the \c IsAvailable bit
   /// If any of these features is not present, the \c IsAvailable bit
   /// will be false to indicate that this (sub)module is not
   /// will be false to indicate that this (sub)module is not
   /// available.
   /// available.
-  llvm::SmallVector<std::string, 2> Requires;
+  SmallVector<std::string, 2> Requires;
 
 
   /// \brief Whether this module is available in the current
   /// \brief Whether this module is available in the current
   /// translation unit.
   /// translation unit.
@@ -137,7 +136,7 @@ public:
 
 
   /// \brief The set of modules imported by this module, and on which this
   /// \brief The set of modules imported by this module, and on which this
   /// module depends.
   /// module depends.
-  llvm::SmallVector<Module *, 2> Imports;
+  SmallVector<Module *, 2> Imports;
   
   
   /// \brief Describes an exported module.
   /// \brief Describes an exported module.
   ///
   ///
@@ -146,7 +145,7 @@ public:
   typedef llvm::PointerIntPair<Module *, 1, bool> ExportDecl;
   typedef llvm::PointerIntPair<Module *, 1, bool> ExportDecl;
   
   
   /// \brief The set of export declarations.
   /// \brief The set of export declarations.
-  llvm::SmallVector<ExportDecl, 2> Exports;
+  SmallVector<ExportDecl, 2> Exports;
   
   
   /// \brief Describes an exported module that has not yet been resolved
   /// \brief Describes an exported module that has not yet been resolved
   /// (perhaps because the module it refers to has not yet been loaded).
   /// (perhaps because the module it refers to has not yet been loaded).
@@ -164,7 +163,7 @@ public:
   };
   };
   
   
   /// \brief The set of export declarations that have yet to be resolved.
   /// \brief The set of export declarations that have yet to be resolved.
-  llvm::SmallVector<UnresolvedExportDecl, 2> UnresolvedExports;
+  SmallVector<UnresolvedExportDecl, 2> UnresolvedExports;
   
   
   /// \brief Construct a top-level module.
   /// \brief Construct a top-level module.
   explicit Module(StringRef Name, SourceLocation DefinitionLoc,
   explicit Module(StringRef Name, SourceLocation DefinitionLoc,
@@ -299,7 +298,7 @@ public:
 
 
   /// \brief Print the module map for this module to the given stream. 
   /// \brief Print the module map for this module to the given stream. 
   ///
   ///
-  void print(llvm::raw_ostream &OS, unsigned Indent = 0) const;
+  void print(raw_ostream &OS, unsigned Indent = 0) const;
   
   
   /// \brief Dump the contents of this module to the given output stream.
   /// \brief Dump the contents of this module to the given output stream.
   void dump() const;
   void dump() const;

+ 1 - 1
include/clang/Basic/PartialDiagnostic.h

@@ -321,7 +321,7 @@ public:
   }
   }
 
 
   void EmitToString(DiagnosticsEngine &Diags,
   void EmitToString(DiagnosticsEngine &Diags,
-                    llvm::SmallVectorImpl<char> &Buf) const {
+                    SmallVectorImpl<char> &Buf) const {
     // FIXME: It should be possible to render a diagnostic to a string without
     // FIXME: It should be possible to render a diagnostic to a string without
     //        messing with the state of the diagnostics engine.
     //        messing with the state of the diagnostics engine.
     DiagnosticBuilder DB(Diags.Report(getDiagID()));
     DiagnosticBuilder DB(Diags.Report(getDiagID()));

+ 1 - 1
include/clang/Basic/SourceManager.h

@@ -522,7 +522,7 @@ public:
 /// \brief The stack used when building modules on demand, which is used
 /// \brief The stack used when building modules on demand, which is used
 /// to provide a link between the source managers of the different compiler
 /// to provide a link between the source managers of the different compiler
 /// instances.
 /// instances.
-typedef llvm::ArrayRef<std::pair<std::string, FullSourceLoc> > ModuleBuildStack;
+typedef ArrayRef<std::pair<std::string, FullSourceLoc> > ModuleBuildStack;
 
 
 /// \brief This class handles loading and caching of source files into memory.
 /// \brief This class handles loading and caching of source files into memory.
 ///
 ///

+ 1 - 1
include/clang/Basic/TargetInfo.h

@@ -62,7 +62,7 @@ enum TargetCXXABI {
 /// \brief Exposes information about the current target.
 /// \brief Exposes information about the current target.
 ///
 ///
 class TargetInfo : public RefCountedBase<TargetInfo> {
 class TargetInfo : public RefCountedBase<TargetInfo> {
-  llvm::IntrusiveRefCntPtr<TargetOptions> TargetOpts;
+  IntrusiveRefCntPtr<TargetOptions> TargetOpts;
   llvm::Triple Triple;
   llvm::Triple Triple;
 protected:
 protected:
   // Target values set by the ctor of the actual target implementation.  Default
   // Target values set by the ctor of the actual target implementation.  Default

+ 1 - 3
include/clang/Driver/Driver.h

@@ -11,6 +11,7 @@
 #define CLANG_DRIVER_DRIVER_H_
 #define CLANG_DRIVER_DRIVER_H_
 
 
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/Diagnostic.h"
+#include "clang/Basic/LLVM.h"
 #include "clang/Driver/Phases.h"
 #include "clang/Driver/Phases.h"
 #include "clang/Driver/Types.h"
 #include "clang/Driver/Types.h"
 #include "clang/Driver/Util.h"
 #include "clang/Driver/Util.h"
@@ -23,9 +24,6 @@
 #include <set>
 #include <set>
 #include <string>
 #include <string>
 
 
-namespace llvm {
-  template<typename T> class ArrayRef;
-}
 namespace clang {
 namespace clang {
 namespace driver {
 namespace driver {
   class Action;
   class Action;

+ 3 - 2
include/clang/Frontend/LayoutOverrideSource.h

@@ -11,6 +11,7 @@
 #define LLVM_CLANG_FRONTEND_LAYOUTOVERRIDESOURCE_H
 #define LLVM_CLANG_FRONTEND_LAYOUTOVERRIDESOURCE_H
 
 
 #include "clang/AST/ExternalASTSource.h"
 #include "clang/AST/ExternalASTSource.h"
+#include "clang/Basic/LLVM.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringRef.h"
 
 
@@ -31,7 +32,7 @@ namespace clang {
       uint64_t Align;
       uint64_t Align;
       
       
       /// \brief The offsets of the fields, in source order.
       /// \brief The offsets of the fields, in source order.
-      llvm::SmallVector<uint64_t, 8> FieldOffsets;
+      SmallVector<uint64_t, 8> FieldOffsets;
     };
     };
     
     
     /// \brief The set of layouts that will be overridden.
     /// \brief The set of layouts that will be overridden.
@@ -42,7 +43,7 @@ namespace clang {
     /// set of record types.
     /// set of record types.
     ///
     ///
     /// The file is the result of passing -fdump-record-layouts to a file.
     /// The file is the result of passing -fdump-record-layouts to a file.
-    explicit LayoutOverrideSource(llvm::StringRef Filename);
+    explicit LayoutOverrideSource(StringRef Filename);
     
     
     /// \brief If this particular record type has an overridden layout,
     /// \brief If this particular record type has an overridden layout,
     /// return that layout.
     /// return that layout.

+ 1 - 1
include/clang/Frontend/LogDiagnosticPrinter.h

@@ -42,7 +42,7 @@ class LogDiagnosticPrinter : public DiagnosticConsumer {
   
   
   raw_ostream &OS;
   raw_ostream &OS;
   const LangOptions *LangOpts;
   const LangOptions *LangOpts;
-  llvm::IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts;
+  IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts;
 
 
   SourceLocation LastWarningLoc;
   SourceLocation LastWarningLoc;
   FullSourceLoc LastLoc;
   FullSourceLoc LastLoc;

+ 2 - 1
include/clang/Frontend/SerializedDiagnosticPrinter.h

@@ -10,6 +10,7 @@
 #ifndef LLVM_CLANG_FRONTEND_SERIALIZE_DIAGNOSTIC_PRINTER_H_
 #ifndef LLVM_CLANG_FRONTEND_SERIALIZE_DIAGNOSTIC_PRINTER_H_
 #define LLVM_CLANG_FRONTEND_SERIALIZE_DIAGNOSTIC_PRINTER_H_
 #define LLVM_CLANG_FRONTEND_SERIALIZE_DIAGNOSTIC_PRINTER_H_
 
 
+#include "clang/Basic/LLVM.h"
 #include "llvm/Bitcode/BitstreamWriter.h"
 #include "llvm/Bitcode/BitstreamWriter.h"
 
 
 namespace llvm {
 namespace llvm {
@@ -53,7 +54,7 @@ enum RecordIDs {
 /// This allows wrapper tools for Clang to get diagnostics from Clang
 /// This allows wrapper tools for Clang to get diagnostics from Clang
 /// (via libclang) without needing to parse Clang's command line output.
 /// (via libclang) without needing to parse Clang's command line output.
 ///
 ///
-DiagnosticConsumer *create(llvm::raw_ostream *OS,
+DiagnosticConsumer *create(raw_ostream *OS,
                            DiagnosticOptions *diags);
                            DiagnosticOptions *diags);
 
 
 } // end serialized_diags namespace
 } // end serialized_diags namespace

+ 1 - 1
include/clang/Frontend/TextDiagnosticPrinter.h

@@ -27,7 +27,7 @@ class TextDiagnostic;
 
 
 class TextDiagnosticPrinter : public DiagnosticConsumer {
 class TextDiagnosticPrinter : public DiagnosticConsumer {
   raw_ostream &OS;
   raw_ostream &OS;
-  llvm::IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts;
+  IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts;
 
 
   /// \brief Handle to the currently active text diagnostic emitter.
   /// \brief Handle to the currently active text diagnostic emitter.
   OwningPtr<TextDiagnostic> TextDiag;
   OwningPtr<TextDiagnostic> TextDiag;

+ 3 - 3
include/clang/Lex/HeaderSearch.h

@@ -134,7 +134,7 @@ class HeaderSearch {
   };
   };
 
 
   /// \brief Header-search options used to initialize this header search.
   /// \brief Header-search options used to initialize this header search.
-  llvm::IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts;
+  IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts;
 
 
   FileManager &FileMgr;
   FileManager &FileMgr;
   /// \#include search path information.  Requests for \#include "x" search the
   /// \#include search path information.  Requests for \#include "x" search the
@@ -217,7 +217,7 @@ class HeaderSearch {
   friend class DirectoryLookup;
   friend class DirectoryLookup;
   
   
 public:
 public:
-  HeaderSearch(llvm::IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts,
+  HeaderSearch(IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts,
                FileManager &FM, DiagnosticsEngine &Diags,
                FileManager &FM, DiagnosticsEngine &Diags,
                const LangOptions &LangOpts, const TargetInfo *Target);
                const LangOptions &LangOpts, const TargetInfo *Target);
   ~HeaderSearch();
   ~HeaderSearch();
@@ -480,7 +480,7 @@ public:
   /// \brief Collect the set of all known, top-level modules.
   /// \brief Collect the set of all known, top-level modules.
   ///
   ///
   /// \param Modules Will be filled with the set of known, top-level modules.
   /// \param Modules Will be filled with the set of known, top-level modules.
-  void collectAllModules(llvm::SmallVectorImpl<Module *> &Modules);
+  void collectAllModules(SmallVectorImpl<Module *> &Modules);
                          
                          
 private:
 private:
   /// \brief Retrieve a module with the given name, which may be part of the
   /// \brief Retrieve a module with the given name, which may be part of the

+ 1 - 1
include/clang/Lex/HeaderSearchOptions.h

@@ -38,7 +38,7 @@ namespace frontend {
 
 
 /// HeaderSearchOptions - Helper class for storing options related to the
 /// HeaderSearchOptions - Helper class for storing options related to the
 /// initialization of the HeaderSearch object.
 /// initialization of the HeaderSearch object.
-class HeaderSearchOptions : public llvm::RefCountedBase<HeaderSearchOptions> {
+class HeaderSearchOptions : public RefCountedBase<HeaderSearchOptions> {
 public:
 public:
   struct Entry {
   struct Entry {
     std::string Path;
     std::string Path;

+ 1 - 2
include/clang/Lex/ModuleLoader.h

@@ -26,8 +26,7 @@ class Module;
 
 
 /// \brief A sequence of identifier/location pairs used to describe a particular
 /// \brief A sequence of identifier/location pairs used to describe a particular
 /// module or submodule, e.g., std.vector.
 /// module or submodule, e.g., std.vector.
-typedef llvm::ArrayRef<std::pair<IdentifierInfo*, SourceLocation> > 
-  ModuleIdPath;
+typedef ArrayRef<std::pair<IdentifierInfo *, SourceLocation> > ModuleIdPath;
 
 
 /// \brief Describes the result of attempting to load a module.
 /// \brief Describes the result of attempting to load a module.
 class ModuleLoadResult {
 class ModuleLoadResult {

+ 1 - 1
include/clang/Lex/ModuleMap.h

@@ -104,7 +104,7 @@ class ModuleMap {
 
 
     /// \brief The names of modules that cannot be inferred within this
     /// \brief The names of modules that cannot be inferred within this
     /// directory.
     /// directory.
-    llvm::SmallVector<std::string, 2> ExcludedModules;
+    SmallVector<std::string, 2> ExcludedModules;
   };
   };
 
 
   /// \brief A mapping from directories to information about inferring
   /// \brief A mapping from directories to information about inferring

+ 3 - 4
include/clang/Lex/Preprocessor.h

@@ -84,7 +84,7 @@ public:
 /// like the \#include stack, token expansion, etc.
 /// like the \#include stack, token expansion, etc.
 ///
 ///
 class Preprocessor : public RefCountedBase<Preprocessor> {
 class Preprocessor : public RefCountedBase<Preprocessor> {
-  llvm::IntrusiveRefCntPtr<PreprocessorOptions> PPOpts;
+  IntrusiveRefCntPtr<PreprocessorOptions> PPOpts;
   DiagnosticsEngine        *Diags;
   DiagnosticsEngine        *Diags;
   LangOptions       &LangOpts;
   LangOptions       &LangOpts;
   const TargetInfo  *Target;
   const TargetInfo  *Target;
@@ -215,8 +215,7 @@ class Preprocessor : public RefCountedBase<Preprocessor> {
   SourceLocation ModuleImportLoc;
   SourceLocation ModuleImportLoc;
 
 
   /// \brief The module import path that we're currently processing.
   /// \brief The module import path that we're currently processing.
-  llvm::SmallVector<std::pair<IdentifierInfo *, SourceLocation>, 2> 
-    ModuleImportPath;
+  SmallVector<std::pair<IdentifierInfo *, SourceLocation>, 2> ModuleImportPath;
   
   
   /// \brief Whether the module import expectes an identifier next. Otherwise,
   /// \brief Whether the module import expectes an identifier next. Otherwise,
   /// it expects a '.' or ';'.
   /// it expects a '.' or ';'.
@@ -396,7 +395,7 @@ private:  // Cached tokens state.
   MacroInfoChain *MICache;
   MacroInfoChain *MICache;
 
 
 public:
 public:
-  Preprocessor(llvm::IntrusiveRefCntPtr<PreprocessorOptions> PPOpts,
+  Preprocessor(IntrusiveRefCntPtr<PreprocessorOptions> PPOpts,
                DiagnosticsEngine &diags, LangOptions &opts,
                DiagnosticsEngine &diags, LangOptions &opts,
                const TargetInfo *target,
                const TargetInfo *target,
                SourceManager &SM, HeaderSearch &Headers,
                SourceManager &SM, HeaderSearch &Headers,

+ 3 - 3
include/clang/Lex/PreprocessorOptions.h

@@ -41,7 +41,7 @@ enum ObjCXXARCStandardLibraryKind {
   
   
 /// PreprocessorOptions - This class is used for passing the various options
 /// PreprocessorOptions - This class is used for passing the various options
 /// used in preprocessor initialization to InitializePreprocessor().
 /// used in preprocessor initialization to InitializePreprocessor().
-class PreprocessorOptions : public llvm::RefCountedBase<PreprocessorOptions> {
+class PreprocessorOptions : public RefCountedBase<PreprocessorOptions> {
 public:
 public:
   std::vector<std::pair<std::string, bool/*isUndef*/> > Macros;
   std::vector<std::pair<std::string, bool/*isUndef*/> > Macros;
   std::vector<std::string> Includes;
   std::vector<std::string> Includes;
@@ -118,7 +118,7 @@ public:
   ObjCXXARCStandardLibraryKind ObjCXXARCStandardLibrary;
   ObjCXXARCStandardLibraryKind ObjCXXARCStandardLibrary;
     
     
   /// \brief Records the set of modules
   /// \brief Records the set of modules
-  class FailedModulesSet : public llvm::RefCountedBase<FailedModulesSet> {
+  class FailedModulesSet : public RefCountedBase<FailedModulesSet> {
     llvm::StringSet<> Failed;
     llvm::StringSet<> Failed;
 
 
   public:
   public:
@@ -137,7 +137,7 @@ public:
   /// to (re)build modules, so that once a module fails to build anywhere,
   /// to (re)build modules, so that once a module fails to build anywhere,
   /// other instances will see that the module has failed and won't try to
   /// other instances will see that the module has failed and won't try to
   /// build it again.
   /// build it again.
-  llvm::IntrusiveRefCntPtr<FailedModulesSet> FailedModules;
+  IntrusiveRefCntPtr<FailedModulesSet> FailedModules;
 
 
   typedef std::vector<std::pair<std::string, std::string> >::iterator
   typedef std::vector<std::pair<std::string, std::string> >::iterator
     remapped_file_iterator;
     remapped_file_iterator;

+ 3 - 3
include/clang/Parse/Parser.h

@@ -804,7 +804,7 @@ private:
   };
   };
 
 
   // A list of late-parsed attributes.  Used by ParseGNUAttributes.
   // A list of late-parsed attributes.  Used by ParseGNUAttributes.
-  class LateParsedAttrList: public llvm::SmallVector<LateParsedAttribute*, 2> {
+  class LateParsedAttrList: public SmallVector<LateParsedAttribute *, 2> {
   public:
   public:
     LateParsedAttrList(bool PSoon = false) : ParseSoon(PSoon) { }
     LateParsedAttrList(bool PSoon = false) : ParseSoon(PSoon) { }
 
 
@@ -1245,7 +1245,7 @@ private:
                            SmallVectorImpl<SourceLocation> &CommaLocs,
                            SmallVectorImpl<SourceLocation> &CommaLocs,
                            void (Sema::*Completer)(Scope *S,
                            void (Sema::*Completer)(Scope *S,
                                                    Expr *Data,
                                                    Expr *Data,
-                                             llvm::ArrayRef<Expr *> Args) = 0,
+                                                   ArrayRef<Expr *> Args) = 0,
                            Expr *Data = 0);
                            Expr *Data = 0);
 
 
   /// ParenParseOption - Control what ParseParenExpression will parse.
   /// ParenParseOption - Control what ParseParenExpression will parse.
@@ -1911,7 +1911,7 @@ private:
                                   ParsedAttributes &attrs,
                                   ParsedAttributes &attrs,
                                   SourceLocation *endLoc);
                                   SourceLocation *endLoc);
 
 
-  bool IsThreadSafetyAttribute(llvm::StringRef AttrName);
+  bool IsThreadSafetyAttribute(StringRef AttrName);
   void ParseThreadSafetyAttribute(IdentifierInfo &AttrName,
   void ParseThreadSafetyAttribute(IdentifierInfo &AttrName,
                                   SourceLocation AttrNameLoc,
                                   SourceLocation AttrNameLoc,
                                   ParsedAttributes &Attrs,
                                   ParsedAttributes &Attrs,

+ 1 - 1
include/clang/Sema/DeclSpec.h

@@ -2010,7 +2010,7 @@ struct LambdaIntroducer {
   SourceRange Range;
   SourceRange Range;
   SourceLocation DefaultLoc;
   SourceLocation DefaultLoc;
   LambdaCaptureDefault Default;
   LambdaCaptureDefault Default;
-  llvm::SmallVector<LambdaCapture, 4> Captures;
+  SmallVector<LambdaCapture, 4> Captures;
 
 
   LambdaIntroducer()
   LambdaIntroducer()
     : Default(LCD_None) {}
     : Default(LCD_None) {}

+ 3 - 4
include/clang/Sema/DelayedDiagnostic.h

@@ -224,14 +224,14 @@ private:
 /// delayed.
 /// delayed.
 class DelayedDiagnosticPool {
 class DelayedDiagnosticPool {
   const DelayedDiagnosticPool *Parent;
   const DelayedDiagnosticPool *Parent;
-  llvm::SmallVector<DelayedDiagnostic, 4> Diagnostics;
+  SmallVector<DelayedDiagnostic, 4> Diagnostics;
 
 
   DelayedDiagnosticPool(const DelayedDiagnosticPool &) LLVM_DELETED_FUNCTION;
   DelayedDiagnosticPool(const DelayedDiagnosticPool &) LLVM_DELETED_FUNCTION;
   void operator=(const DelayedDiagnosticPool &) LLVM_DELETED_FUNCTION;
   void operator=(const DelayedDiagnosticPool &) LLVM_DELETED_FUNCTION;
 public:
 public:
   DelayedDiagnosticPool(const DelayedDiagnosticPool *parent) : Parent(parent) {}
   DelayedDiagnosticPool(const DelayedDiagnosticPool *parent) : Parent(parent) {}
   ~DelayedDiagnosticPool() {
   ~DelayedDiagnosticPool() {
-    for (llvm::SmallVectorImpl<DelayedDiagnostic>::iterator
+    for (SmallVectorImpl<DelayedDiagnostic>::iterator
            i = Diagnostics.begin(), e = Diagnostics.end(); i != e; ++i)
            i = Diagnostics.begin(), e = Diagnostics.end(); i != e; ++i)
       i->Destroy();
       i->Destroy();
   }
   }
@@ -260,8 +260,7 @@ public:
     pool.Diagnostics.clear();
     pool.Diagnostics.clear();
   }
   }
 
 
-  typedef llvm::SmallVectorImpl<DelayedDiagnostic>::const_iterator
-    pool_iterator;
+  typedef SmallVectorImpl<DelayedDiagnostic>::const_iterator pool_iterator;
   pool_iterator pool_begin() const { return Diagnostics.begin(); }
   pool_iterator pool_begin() const { return Diagnostics.begin(); }
   pool_iterator pool_end() const { return Diagnostics.end(); }
   pool_iterator pool_end() const { return Diagnostics.end(); }
   bool pool_empty() const { return Diagnostics.empty(); }
   bool pool_empty() const { return Diagnostics.empty(); }

+ 1 - 1
include/clang/Sema/MultiplexExternalSemaSource.h

@@ -39,7 +39,7 @@ namespace clang {
 class MultiplexExternalSemaSource : public ExternalSemaSource {
 class MultiplexExternalSemaSource : public ExternalSemaSource {
 
 
 private:
 private:
-  llvm::SmallVector<ExternalSemaSource*, 2> Sources; // doesn't own them.
+  SmallVector<ExternalSemaSource *, 2> Sources; // doesn't own them.
 
 
 public:
 public:
   
   

+ 1 - 1
include/clang/Sema/Overload.h

@@ -809,7 +809,7 @@ namespace clang {
 
 
     void NoteCandidates(Sema &S,
     void NoteCandidates(Sema &S,
                         OverloadCandidateDisplayKind OCD,
                         OverloadCandidateDisplayKind OCD,
-                        llvm::ArrayRef<Expr *> Args,
+                        ArrayRef<Expr *> Args,
                         StringRef Opc = "",
                         StringRef Opc = "",
                         SourceLocation Loc = SourceLocation());
                         SourceLocation Loc = SourceLocation());
   };
   };

+ 2 - 2
include/clang/Sema/ScopeInfo.h

@@ -511,11 +511,11 @@ public:
   bool ContainsUnexpandedParameterPack;
   bool ContainsUnexpandedParameterPack;
 
 
   /// \brief Variables used to index into by-copy array captures.
   /// \brief Variables used to index into by-copy array captures.
-  llvm::SmallVector<VarDecl *, 4> ArrayIndexVars;
+  SmallVector<VarDecl *, 4> ArrayIndexVars;
 
 
   /// \brief Offsets into the ArrayIndexVars array at which each capture starts
   /// \brief Offsets into the ArrayIndexVars array at which each capture starts
   /// its list of array index variables.
   /// its list of array index variables.
-  llvm::SmallVector<unsigned, 4> ArrayIndexStarts;
+  SmallVector<unsigned, 4> ArrayIndexStarts;
   
   
   LambdaScopeInfo(DiagnosticsEngine &Diag, CXXRecordDecl *Lambda,
   LambdaScopeInfo(DiagnosticsEngine &Diag, CXXRecordDecl *Lambda,
                   CXXMethodDecl *CallOperator)
                   CXXMethodDecl *CallOperator)

+ 21 - 21
include/clang/Sema/Sema.h

@@ -540,7 +540,7 @@ public:
   RecordDecl *MSVCGuidDecl;
   RecordDecl *MSVCGuidDecl;
 
 
   /// \brief Caches identifiers/selectors for NSFoundation APIs.
   /// \brief Caches identifiers/selectors for NSFoundation APIs.
-  llvm::OwningPtr<NSAPI> NSAPIObj;
+  OwningPtr<NSAPI> NSAPIObj;
 
 
   /// \brief The declaration of the Objective-C NSNumber class.
   /// \brief The declaration of the Objective-C NSNumber class.
   ObjCInterfaceDecl *NSNumberDecl;
   ObjCInterfaceDecl *NSNumberDecl;
@@ -630,7 +630,7 @@ public:
 
 
     /// \brief The lambdas that are present within this context, if it
     /// \brief The lambdas that are present within this context, if it
     /// is indeed an unevaluated context.
     /// is indeed an unevaluated context.
-    llvm::SmallVector<LambdaExpr *, 2> Lambdas;
+    SmallVector<LambdaExpr *, 2> Lambdas;
 
 
     /// \brief The declaration that provides context for the lambda expression
     /// \brief The declaration that provides context for the lambda expression
     /// if the normal declaration context does not suffice, e.g., in a
     /// if the normal declaration context does not suffice, e.g., in a
@@ -646,11 +646,11 @@ public:
 
 
     /// \brief If we are processing a decltype type, a set of call expressions
     /// \brief If we are processing a decltype type, a set of call expressions
     /// for which we have deferred checking the completeness of the return type.
     /// for which we have deferred checking the completeness of the return type.
-    llvm::SmallVector<CallExpr*, 8> DelayedDecltypeCalls;
+    SmallVector<CallExpr *, 8> DelayedDecltypeCalls;
 
 
     /// \brief If we are processing a decltype type, a set of temporary binding
     /// \brief If we are processing a decltype type, a set of temporary binding
     /// expressions for which we have deferred checking the destructor.
     /// expressions for which we have deferred checking the destructor.
-    llvm::SmallVector<CXXBindTemporaryExpr*, 8> DelayedDecltypeBinds;
+    SmallVector<CXXBindTemporaryExpr *, 8> DelayedDecltypeBinds;
 
 
     ExpressionEvaluationContextRecord(ExpressionEvaluationContext Context,
     ExpressionEvaluationContextRecord(ExpressionEvaluationContext Context,
                                       unsigned NumCleanupObjects,
                                       unsigned NumCleanupObjects,
@@ -1554,7 +1554,7 @@ public:
 
 
   // This is used for both record definitions and ObjC interface declarations.
   // This is used for both record definitions and ObjC interface declarations.
   void ActOnFields(Scope* S, SourceLocation RecLoc, Decl *TagDecl,
   void ActOnFields(Scope* S, SourceLocation RecLoc, Decl *TagDecl,
-                   llvm::ArrayRef<Decl *> Fields,
+                   ArrayRef<Decl *> Fields,
                    SourceLocation LBrac, SourceLocation RBrac,
                    SourceLocation LBrac, SourceLocation RBrac,
                    AttributeList *AttrList);
                    AttributeList *AttrList);
 
 
@@ -1899,13 +1899,13 @@ public:
 
 
   void AddOverloadCandidate(FunctionDecl *Function,
   void AddOverloadCandidate(FunctionDecl *Function,
                             DeclAccessPair FoundDecl,
                             DeclAccessPair FoundDecl,
-                            llvm::ArrayRef<Expr *> Args,
+                            ArrayRef<Expr *> Args,
                             OverloadCandidateSet& CandidateSet,
                             OverloadCandidateSet& CandidateSet,
                             bool SuppressUserConversions = false,
                             bool SuppressUserConversions = false,
                             bool PartialOverloading = false,
                             bool PartialOverloading = false,
                             bool AllowExplicit = false);
                             bool AllowExplicit = false);
   void AddFunctionCandidates(const UnresolvedSetImpl &Functions,
   void AddFunctionCandidates(const UnresolvedSetImpl &Functions,
-                             llvm::ArrayRef<Expr *> Args,
+                             ArrayRef<Expr *> Args,
                              OverloadCandidateSet& CandidateSet,
                              OverloadCandidateSet& CandidateSet,
                              bool SuppressUserConversions = false,
                              bool SuppressUserConversions = false,
                             TemplateArgumentListInfo *ExplicitTemplateArgs = 0);
                             TemplateArgumentListInfo *ExplicitTemplateArgs = 0);
@@ -1919,7 +1919,7 @@ public:
                           DeclAccessPair FoundDecl,
                           DeclAccessPair FoundDecl,
                           CXXRecordDecl *ActingContext, QualType ObjectType,
                           CXXRecordDecl *ActingContext, QualType ObjectType,
                           Expr::Classification ObjectClassification,
                           Expr::Classification ObjectClassification,
-                          llvm::ArrayRef<Expr *> Args,
+                          ArrayRef<Expr *> Args,
                           OverloadCandidateSet& CandidateSet,
                           OverloadCandidateSet& CandidateSet,
                           bool SuppressUserConversions = false);
                           bool SuppressUserConversions = false);
   void AddMethodTemplateCandidate(FunctionTemplateDecl *MethodTmpl,
   void AddMethodTemplateCandidate(FunctionTemplateDecl *MethodTmpl,
@@ -1928,13 +1928,13 @@ public:
                                  TemplateArgumentListInfo *ExplicitTemplateArgs,
                                  TemplateArgumentListInfo *ExplicitTemplateArgs,
                                   QualType ObjectType,
                                   QualType ObjectType,
                                   Expr::Classification ObjectClassification,
                                   Expr::Classification ObjectClassification,
-                                  llvm::ArrayRef<Expr *> Args,
+                                  ArrayRef<Expr *> Args,
                                   OverloadCandidateSet& CandidateSet,
                                   OverloadCandidateSet& CandidateSet,
                                   bool SuppressUserConversions = false);
                                   bool SuppressUserConversions = false);
   void AddTemplateOverloadCandidate(FunctionTemplateDecl *FunctionTemplate,
   void AddTemplateOverloadCandidate(FunctionTemplateDecl *FunctionTemplate,
                                     DeclAccessPair FoundDecl,
                                     DeclAccessPair FoundDecl,
                                  TemplateArgumentListInfo *ExplicitTemplateArgs,
                                  TemplateArgumentListInfo *ExplicitTemplateArgs,
-                                    llvm::ArrayRef<Expr *> Args,
+                                    ArrayRef<Expr *> Args,
                                     OverloadCandidateSet& CandidateSet,
                                     OverloadCandidateSet& CandidateSet,
                                     bool SuppressUserConversions = false);
                                     bool SuppressUserConversions = false);
   void AddConversionCandidate(CXXConversionDecl *Conversion,
   void AddConversionCandidate(CXXConversionDecl *Conversion,
@@ -1951,7 +1951,7 @@ public:
                              DeclAccessPair FoundDecl,
                              DeclAccessPair FoundDecl,
                              CXXRecordDecl *ActingContext,
                              CXXRecordDecl *ActingContext,
                              const FunctionProtoType *Proto,
                              const FunctionProtoType *Proto,
-                             Expr *Object, llvm::ArrayRef<Expr*> Args,
+                             Expr *Object, ArrayRef<Expr *> Args,
                              OverloadCandidateSet& CandidateSet);
                              OverloadCandidateSet& CandidateSet);
   void AddMemberOperatorCandidates(OverloadedOperatorKind Op,
   void AddMemberOperatorCandidates(OverloadedOperatorKind Op,
                                    SourceLocation OpLoc,
                                    SourceLocation OpLoc,
@@ -1969,7 +1969,7 @@ public:
                                     OverloadCandidateSet& CandidateSet);
                                     OverloadCandidateSet& CandidateSet);
   void AddArgumentDependentLookupCandidates(DeclarationName Name,
   void AddArgumentDependentLookupCandidates(DeclarationName Name,
                                             bool Operator, SourceLocation Loc,
                                             bool Operator, SourceLocation Loc,
-                                            llvm::ArrayRef<Expr *> Args,
+                                            ArrayRef<Expr *> Args,
                                 TemplateArgumentListInfo *ExplicitTemplateArgs,
                                 TemplateArgumentListInfo *ExplicitTemplateArgs,
                                             OverloadCandidateSet& CandidateSet,
                                             OverloadCandidateSet& CandidateSet,
                                             bool PartialOverloading = false);
                                             bool PartialOverloading = false);
@@ -2017,7 +2017,7 @@ public:
                                             FunctionDecl *Fn);
                                             FunctionDecl *Fn);
 
 
   void AddOverloadedCallCandidates(UnresolvedLookupExpr *ULE,
   void AddOverloadedCallCandidates(UnresolvedLookupExpr *ULE,
-                                   llvm::ArrayRef<Expr *> Args,
+                                   ArrayRef<Expr *> Args,
                                    OverloadCandidateSet &CandidateSet,
                                    OverloadCandidateSet &CandidateSet,
                                    bool PartialOverloading = false);
                                    bool PartialOverloading = false);
 
 
@@ -2264,7 +2264,7 @@ public:
 
 
   void ArgumentDependentLookup(DeclarationName Name, bool Operator,
   void ArgumentDependentLookup(DeclarationName Name, bool Operator,
                                SourceLocation Loc,
                                SourceLocation Loc,
-                               llvm::ArrayRef<Expr *> Args,
+                               ArrayRef<Expr *> Args,
                                ADLResult &Functions);
                                ADLResult &Functions);
 
 
   void LookupVisibleDecls(Scope *S, LookupNameKind Kind,
   void LookupVisibleDecls(Scope *S, LookupNameKind Kind,
@@ -2283,7 +2283,7 @@ public:
                              const ObjCObjectPointerType *OPT = 0);
                              const ObjCObjectPointerType *OPT = 0);
 
 
   void FindAssociatedClassesAndNamespaces(SourceLocation InstantiationLoc,
   void FindAssociatedClassesAndNamespaces(SourceLocation InstantiationLoc,
-                                          llvm::ArrayRef<Expr *> Args,
+                                          ArrayRef<Expr *> Args,
                                    AssociatedNamespaceSet &AssociatedNamespaces,
                                    AssociatedNamespaceSet &AssociatedNamespaces,
                                    AssociatedClassSet &AssociatedClasses);
                                    AssociatedClassSet &AssociatedClasses);
 
 
@@ -2920,7 +2920,7 @@ public:
   bool DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R,
   bool DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R,
                            CorrectionCandidateCallback &CCC,
                            CorrectionCandidateCallback &CCC,
                            TemplateArgumentListInfo *ExplicitTemplateArgs = 0,
                            TemplateArgumentListInfo *ExplicitTemplateArgs = 0,
-                       llvm::ArrayRef<Expr *> Args = llvm::ArrayRef<Expr *>());
+                           ArrayRef<Expr *> Args = ArrayRef<Expr *>());
 
 
   ExprResult LookupInObjCMethod(LookupResult &LookUp, Scope *S,
   ExprResult LookupInObjCMethod(LookupResult &LookUp, Scope *S,
                                 IdentifierInfo *II,
                                 IdentifierInfo *II,
@@ -3525,7 +3525,7 @@ public:
                                    ArrayRef<ParsedType> DynamicExceptions,
                                    ArrayRef<ParsedType> DynamicExceptions,
                                    ArrayRef<SourceRange> DynamicExceptionRanges,
                                    ArrayRef<SourceRange> DynamicExceptionRanges,
                                    Expr *NoexceptExpr,
                                    Expr *NoexceptExpr,
-                                   llvm::SmallVectorImpl<QualType> &Exceptions,
+                                   SmallVectorImpl<QualType> &Exceptions,
                                    FunctionProtoType::ExtProtoInfo &EPI);
                                    FunctionProtoType::ExtProtoInfo &EPI);
 
 
   /// \brief Determine if a special member function should have a deleted
   /// \brief Determine if a special member function should have a deleted
@@ -4141,7 +4141,7 @@ public:
                                        SourceRange IntroducerRange,
                                        SourceRange IntroducerRange,
                                        TypeSourceInfo *MethodType,
                                        TypeSourceInfo *MethodType,
                                        SourceLocation EndLoc,
                                        SourceLocation EndLoc,
-                                       llvm::ArrayRef<ParmVarDecl *> Params);
+                                       ArrayRef<ParmVarDecl *> Params);
 
 
   /// \brief Introduce the scope for a lambda expression.
   /// \brief Introduce the scope for a lambda expression.
   sema::LambdaScopeInfo *enterLambdaScope(CXXMethodDecl *CallOperator,
   sema::LambdaScopeInfo *enterLambdaScope(CXXMethodDecl *CallOperator,
@@ -5344,7 +5344,7 @@ public:
   /// must be set.
   /// must be set.
   bool CheckParameterPacksForExpansion(SourceLocation EllipsisLoc,
   bool CheckParameterPacksForExpansion(SourceLocation EllipsisLoc,
                                        SourceRange PatternRange,
                                        SourceRange PatternRange,
-                             llvm::ArrayRef<UnexpandedParameterPack> Unexpanded,
+                             ArrayRef<UnexpandedParameterPack> Unexpanded,
                              const MultiLevelTemplateArgumentList &TemplateArgs,
                              const MultiLevelTemplateArgumentList &TemplateArgs,
                                        bool &ShouldExpand,
                                        bool &ShouldExpand,
                                        bool &RetainExpansion,
                                        bool &RetainExpansion,
@@ -5469,7 +5469,7 @@ public:
   TemplateDeductionResult
   TemplateDeductionResult
   DeduceTemplateArguments(FunctionTemplateDecl *FunctionTemplate,
   DeduceTemplateArguments(FunctionTemplateDecl *FunctionTemplate,
                           TemplateArgumentListInfo *ExplicitTemplateArgs,
                           TemplateArgumentListInfo *ExplicitTemplateArgs,
-                          llvm::ArrayRef<Expr *> Args,
+                          ArrayRef<Expr *> Args,
                           FunctionDecl *&Specialization,
                           FunctionDecl *&Specialization,
                           sema::TemplateDeductionInfo &Info);
                           sema::TemplateDeductionInfo &Info);
 
 
@@ -7086,7 +7086,7 @@ public:
   void CodeCompleteTag(Scope *S, unsigned TagSpec);
   void CodeCompleteTag(Scope *S, unsigned TagSpec);
   void CodeCompleteTypeQualifiers(DeclSpec &DS);
   void CodeCompleteTypeQualifiers(DeclSpec &DS);
   void CodeCompleteCase(Scope *S);
   void CodeCompleteCase(Scope *S);
-  void CodeCompleteCall(Scope *S, Expr *Fn, llvm::ArrayRef<Expr *> Args);
+  void CodeCompleteCall(Scope *S, Expr *Fn, ArrayRef<Expr *> Args);
   void CodeCompleteInitializer(Scope *S, Decl *D);
   void CodeCompleteInitializer(Scope *S, Decl *D);
   void CodeCompleteReturn(Scope *S);
   void CodeCompleteReturn(Scope *S);
   void CodeCompleteAfterIf(Scope *S);
   void CodeCompleteAfterIf(Scope *S);

+ 3 - 3
include/clang/Sema/TypoCorrection.h

@@ -182,12 +182,12 @@ public:
     return CorrectionRange;
     return CorrectionRange;
   }
   }
 
 
-  typedef llvm::SmallVector<NamedDecl*, 1>::iterator decl_iterator;
+  typedef SmallVector<NamedDecl *, 1>::iterator decl_iterator;
   decl_iterator begin() {
   decl_iterator begin() {
     return isKeyword() ? CorrectionDecls.end() : CorrectionDecls.begin();
     return isKeyword() ? CorrectionDecls.end() : CorrectionDecls.begin();
   }
   }
   decl_iterator end() { return CorrectionDecls.end(); }
   decl_iterator end() { return CorrectionDecls.end(); }
-  typedef llvm::SmallVector<NamedDecl*, 1>::const_iterator const_decl_iterator;
+  typedef SmallVector<NamedDecl *, 1>::const_iterator const_decl_iterator;
   const_decl_iterator begin() const {
   const_decl_iterator begin() const {
     return isKeyword() ? CorrectionDecls.end() : CorrectionDecls.begin();
     return isKeyword() ? CorrectionDecls.end() : CorrectionDecls.begin();
   }
   }
@@ -201,7 +201,7 @@ private:
   // Results.
   // Results.
   DeclarationName CorrectionName;
   DeclarationName CorrectionName;
   NestedNameSpecifier *CorrectionNameSpec;
   NestedNameSpecifier *CorrectionNameSpec;
-  llvm::SmallVector<NamedDecl*, 1> CorrectionDecls;
+  SmallVector<NamedDecl *, 1> CorrectionDecls;
   unsigned CharDistance;
   unsigned CharDistance;
   unsigned QualifierDistance;
   unsigned QualifierDistance;
   unsigned CallbackDistance;
   unsigned CallbackDistance;

+ 11 - 13
include/clang/Serialization/ASTReader.h

@@ -388,7 +388,7 @@ private:
 
 
   typedef llvm::MapVector<Decl *, uint64_t,
   typedef llvm::MapVector<Decl *, uint64_t,
                           llvm::SmallDenseMap<Decl *, unsigned, 4>,
                           llvm::SmallDenseMap<Decl *, unsigned, 4>,
-                          llvm::SmallVector<std::pair<Decl *, uint64_t>, 4> >
+                          SmallVector<std::pair<Decl *, uint64_t>, 4> >
     PendingBodiesMap;
     PendingBodiesMap;
 
 
   /// \brief Functions or methods that have bodies that will be attached.
   /// \brief Functions or methods that have bodies that will be attached.
@@ -433,7 +433,7 @@ private:
   GlobalMacroMapType GlobalMacroMap;
   GlobalMacroMapType GlobalMacroMap;
 
 
   typedef llvm::DenseMap<serialization::MacroID,
   typedef llvm::DenseMap<serialization::MacroID,
-            llvm::SmallVector<std::pair<serialization::SubmoduleID,
+            SmallVector<std::pair<serialization::SubmoduleID,
                                         MacroUpdate>, 1> >
                                         MacroUpdate>, 1> >
     MacroUpdatesMap;
     MacroUpdatesMap;
 
 
@@ -503,8 +503,7 @@ private:
 };
 };
 
 
   /// \brief A set of hidden declarations.
   /// \brief A set of hidden declarations.
-  typedef llvm::SmallVector<HiddenName, 2>
-    HiddenNames;
+  typedef SmallVector<HiddenName, 2> HiddenNames;
   
   
   typedef llvm::DenseMap<Module *, HiddenNames> HiddenNamesMapType;
   typedef llvm::DenseMap<Module *, HiddenNames> HiddenNamesMapType;
 
 
@@ -533,8 +532,7 @@ private:
   
   
   /// \brief The set of module imports and exports that still need to be 
   /// \brief The set of module imports and exports that still need to be 
   /// resolved.
   /// resolved.
-  llvm::SmallVector<UnresolvedModuleImportExport, 2> 
-    UnresolvedModuleImportExports;
+  SmallVector<UnresolvedModuleImportExport, 2> UnresolvedModuleImportExports;
   
   
   /// \brief A vector containing selectors that have already been loaded.
   /// \brief A vector containing selectors that have already been loaded.
   ///
   ///
@@ -556,7 +554,7 @@ private:
   llvm::DenseMap<Selector, unsigned> SelectorGeneration;
   llvm::DenseMap<Selector, unsigned> SelectorGeneration;
 
 
   typedef llvm::MapVector<IdentifierInfo *,
   typedef llvm::MapVector<IdentifierInfo *,
-                          llvm::SmallVector<serialization::MacroID, 2> >
+                          SmallVector<serialization::MacroID, 2> >
     PendingMacroIDsMap;
     PendingMacroIDsMap;
 
 
   /// \brief Mapping from identifiers that have a macro history to the global
   /// \brief Mapping from identifiers that have a macro history to the global
@@ -798,7 +796,7 @@ private:
   /// Each element is the global declaration ID of the first declaration in
   /// Each element is the global declaration ID of the first declaration in
   /// the chain. Elements in this vector should be unique; use 
   /// the chain. Elements in this vector should be unique; use 
   /// PendingDeclChainsKnown to ensure uniqueness.
   /// PendingDeclChainsKnown to ensure uniqueness.
-  llvm::SmallVector<serialization::DeclID, 16> PendingDeclChains;
+  SmallVector<serialization::DeclID, 16> PendingDeclChains;
 
 
   /// \brief Keeps track of the elements added to PendingDeclChains.
   /// \brief Keeps track of the elements added to PendingDeclChains.
   llvm::SmallSet<serialization::DeclID, 16> PendingDeclChainsKnown;
   llvm::SmallSet<serialization::DeclID, 16> PendingDeclChainsKnown;
@@ -810,9 +808,9 @@ private:
   /// \brief The set of Objective-C class definitions that have already been
   /// \brief The set of Objective-C class definitions that have already been
   /// loaded, for which we will need to check for categories whenever a new
   /// loaded, for which we will need to check for categories whenever a new
   /// module is loaded.
   /// module is loaded.
-  llvm::SmallVector<ObjCInterfaceDecl *, 16> ObjCClassesLoaded;
+  SmallVector<ObjCInterfaceDecl *, 16> ObjCClassesLoaded;
   
   
-  typedef llvm::DenseMap<Decl *, llvm::SmallVector<serialization::DeclID, 2> >
+  typedef llvm::DenseMap<Decl *, SmallVector<serialization::DeclID, 2> >
     MergedDeclsMap;
     MergedDeclsMap;
     
     
   /// \brief A mapping from canonical declarations to the set of additional
   /// \brief A mapping from canonical declarations to the set of additional
@@ -821,7 +819,7 @@ private:
   MergedDeclsMap MergedDecls;
   MergedDeclsMap MergedDecls;
   
   
   typedef llvm::DenseMap<serialization::GlobalDeclID, 
   typedef llvm::DenseMap<serialization::GlobalDeclID, 
-                         llvm::SmallVector<serialization::DeclID, 2> >
+                         SmallVector<serialization::DeclID, 2> >
     StoredMergedDeclsMap;
     StoredMergedDeclsMap;
   
   
   /// \brief A mapping from canonical declaration IDs to the set of additional
   /// \brief A mapping from canonical declaration IDs to the set of additional
@@ -909,10 +907,10 @@ private:
 
 
   ASTReadResult ReadASTCore(StringRef FileName, ModuleKind Type,
   ASTReadResult ReadASTCore(StringRef FileName, ModuleKind Type,
                             SourceLocation ImportLoc, ModuleFile *ImportedBy,
                             SourceLocation ImportLoc, ModuleFile *ImportedBy,
-                            llvm::SmallVectorImpl<ImportedModule> &Loaded,
+                            SmallVectorImpl<ImportedModule> &Loaded,
                             unsigned ClientLoadCapabilities);
                             unsigned ClientLoadCapabilities);
   ASTReadResult ReadControlBlock(ModuleFile &F,
   ASTReadResult ReadControlBlock(ModuleFile &F,
-                                 llvm::SmallVectorImpl<ImportedModule> &Loaded,
+                                 SmallVectorImpl<ImportedModule> &Loaded,
                                  unsigned ClientLoadCapabilities);
                                  unsigned ClientLoadCapabilities);
   bool ReadASTBlock(ModuleFile &F);
   bool ReadASTBlock(ModuleFile &F);
   bool ParseLineTable(ModuleFile &F, SmallVectorImpl<uint64_t> &Record);
   bool ParseLineTable(ModuleFile &F, SmallVectorImpl<uint64_t> &Record);

+ 2 - 2
include/clang/Serialization/ASTWriter.h

@@ -344,7 +344,7 @@ private:
                  
                  
   /// \brief The set of declarations that may have redeclaration chains that
   /// \brief The set of declarations that may have redeclaration chains that
   /// need to be serialized.
   /// need to be serialized.
-  llvm::SetVector<Decl *, llvm::SmallVector<Decl *, 4>, 
+  llvm::SetVector<Decl *, SmallVector<Decl *, 4>,
                   llvm::SmallPtrSet<Decl *, 4> > Redeclarations;
                   llvm::SmallPtrSet<Decl *, 4> > Redeclarations;
                                       
                                       
   /// \brief Statements that we've encountered while serializing a
   /// \brief Statements that we've encountered while serializing a
@@ -729,7 +729,7 @@ class PCHGenerator : public SemaConsumer {
   std::string isysroot;
   std::string isysroot;
   raw_ostream *Out;
   raw_ostream *Out;
   Sema *SemaPtr;
   Sema *SemaPtr;
-  llvm::SmallVector<char, 128> Buffer;
+  SmallVector<char, 128> Buffer;
   llvm::BitstreamWriter Stream;
   llvm::BitstreamWriter Stream;
   ASTWriter Writer;
   ASTWriter Writer;
 
 

+ 1 - 1
include/clang/Serialization/ModuleManager.h

@@ -27,7 +27,7 @@ namespace serialization {
 class ModuleManager {
 class ModuleManager {
   /// \brief The chain of AST files. The first entry is the one named by the
   /// \brief The chain of AST files. The first entry is the one named by the
   /// user, the last one is the one that doesn't depend on anything further.
   /// user, the last one is the one that doesn't depend on anything further.
-  llvm::SmallVector<ModuleFile*, 2> Chain;
+  SmallVector<ModuleFile *, 2> Chain;
   
   
   /// \brief All loaded modules, indexed by name.
   /// \brief All loaded modules, indexed by name.
   llvm::DenseMap<const FileEntry *, ModuleFile *> Modules;
   llvm::DenseMap<const FileEntry *, ModuleFile *> Modules;

+ 3 - 3
include/clang/StaticAnalyzer/Core/AnalyzerOptions.h

@@ -103,7 +103,7 @@ enum CXXInlineableMemberKind {
 };
 };
 
 
 
 
-class AnalyzerOptions : public llvm::RefCountedBase<AnalyzerOptions> {
+class AnalyzerOptions : public RefCountedBase<AnalyzerOptions> {
 public:
 public:
   typedef llvm::StringMap<std::string> ConfigTable;
   typedef llvm::StringMap<std::string> ConfigTable;
 
 
@@ -207,7 +207,7 @@ private:
                         bool DefaultVal);
                         bool DefaultVal);
   
   
   /// Interprets an option's string value as an integer value.
   /// Interprets an option's string value as an integer value.
-  int getOptionAsInteger(llvm::StringRef Name, int DefaultVal);
+  int getOptionAsInteger(StringRef Name, int DefaultVal);
 
 
 public:
 public:
   /// Returns the option controlling which C++ member functions will be
   /// Returns the option controlling which C++ member functions will be
@@ -309,7 +309,7 @@ public:
   }
   }
 };
 };
   
   
-typedef llvm::IntrusiveRefCntPtr<AnalyzerOptions> AnalyzerOptionsRef;
+typedef IntrusiveRefCntPtr<AnalyzerOptions> AnalyzerOptionsRef;
   
   
 }
 }
 
 

+ 2 - 2
include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h

@@ -89,14 +89,14 @@ protected:
   /// diagnostics to include when constructing the final path diagnostic.
   /// diagnostics to include when constructing the final path diagnostic.
   /// The stack is largely used by BugReporter when generating PathDiagnostics
   /// The stack is largely used by BugReporter when generating PathDiagnostics
   /// for multiple PathDiagnosticConsumers.
   /// for multiple PathDiagnosticConsumers.
-  llvm::SmallVector<Symbols *, 2> interestingSymbols;
+  SmallVector<Symbols *, 2> interestingSymbols;
 
 
   /// A (stack of) set of regions that are registered with this report as being
   /// A (stack of) set of regions that are registered with this report as being
   /// "interesting", and thus used to help decide which diagnostics
   /// "interesting", and thus used to help decide which diagnostics
   /// to include when constructing the final path diagnostic.
   /// to include when constructing the final path diagnostic.
   /// The stack is largely used by BugReporter when generating PathDiagnostics
   /// The stack is largely used by BugReporter when generating PathDiagnostics
   /// for multiple PathDiagnosticConsumers.
   /// for multiple PathDiagnosticConsumers.
-  llvm::SmallVector<Regions *, 2> interestingRegions;
+  SmallVector<Regions *, 2> interestingRegions;
 
 
   /// A set of location contexts that correspoind to call sites which should be
   /// A set of location contexts that correspoind to call sites which should be
   /// considered "interesting".
   /// considered "interesting".

+ 1 - 1
include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h

@@ -223,7 +223,7 @@ public:
                                               const ExplodedNode *N);
                                               const ExplodedNode *N);
 
 
   bool patternMatch(const Expr *Ex,
   bool patternMatch(const Expr *Ex,
-                    llvm::raw_ostream &Out,
+                    raw_ostream &Out,
                     BugReporterContext &BRC,
                     BugReporterContext &BRC,
                     BugReport &R,
                     BugReport &R,
                     const ExplodedNode *N,
                     const ExplodedNode *N,

+ 3 - 3
include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h

@@ -341,7 +341,7 @@ protected:
 public:
 public:
   virtual ~PathDiagnosticPiece();
   virtual ~PathDiagnosticPiece();
 
 
-  llvm::StringRef getString() const { return str; }
+  StringRef getString() const { return str; }
 
 
   /// Tag this PathDiagnosticPiece with the given C-string.
   /// Tag this PathDiagnosticPiece with the given C-string.
   void setTag(const char *tag) { Tag = tag; }
   void setTag(const char *tag) { Tag = tag; }
@@ -467,7 +467,7 @@ class PathDiagnosticEventPiece : public PathDiagnosticSpotPiece {
   /// supply a message that will be used to construct an extra hint on the
   /// supply a message that will be used to construct an extra hint on the
   /// returns from all the calls on the stack from this event to the final
   /// returns from all the calls on the stack from this event to the final
   /// diagnostic.
   /// diagnostic.
-  llvm::OwningPtr<StackHintGenerator> CallStackHint;
+  OwningPtr<StackHintGenerator> CallStackHint;
 
 
 public:
 public:
   PathDiagnosticEventPiece(const PathDiagnosticLocation &pos,
   PathDiagnosticEventPiece(const PathDiagnosticLocation &pos,
@@ -670,7 +670,7 @@ class PathDiagnostic : public llvm::FoldingSetNode {
   std::deque<std::string> OtherDesc;
   std::deque<std::string> OtherDesc;
   PathDiagnosticLocation Loc;
   PathDiagnosticLocation Loc;
   PathPieces pathImpl;
   PathPieces pathImpl;
-  llvm::SmallVector<PathPieces *, 3> pathStack;
+  SmallVector<PathPieces *, 3> pathStack;
   
   
   /// \brief Important bug uniqueing location.
   /// \brief Important bug uniqueing location.
   /// The location info is useful to differentiate between bugs.
   /// The location info is useful to differentiate between bugs.

+ 6 - 6
include/clang/StaticAnalyzer/Core/Checker.h

@@ -34,11 +34,11 @@ class ASTDecl {
   template <typename CHECKER>
   template <typename CHECKER>
   static void _checkDecl(void *checker, const Decl *D, AnalysisManager& mgr,
   static void _checkDecl(void *checker, const Decl *D, AnalysisManager& mgr,
                          BugReporter &BR) {
                          BugReporter &BR) {
-    ((const CHECKER *)checker)->checkASTDecl(llvm::cast<DECL>(D), mgr, BR);
+    ((const CHECKER *)checker)->checkASTDecl(cast<DECL>(D), mgr, BR);
   }
   }
 
 
   static bool _handlesDecl(const Decl *D) {
   static bool _handlesDecl(const Decl *D) {
-    return llvm::isa<DECL>(D);
+    return isa<DECL>(D);
   }
   }
 public:
 public:
   template <typename CHECKER>
   template <typename CHECKER>
@@ -86,11 +86,11 @@ template <typename STMT>
 class PreStmt {
 class PreStmt {
   template <typename CHECKER>
   template <typename CHECKER>
   static void _checkStmt(void *checker, const Stmt *S, CheckerContext &C) {
   static void _checkStmt(void *checker, const Stmt *S, CheckerContext &C) {
-    ((const CHECKER *)checker)->checkPreStmt(llvm::cast<STMT>(S), C);
+    ((const CHECKER *)checker)->checkPreStmt(cast<STMT>(S), C);
   }
   }
 
 
   static bool _handlesStmt(const Stmt *S) {
   static bool _handlesStmt(const Stmt *S) {
-    return llvm::isa<STMT>(S);
+    return isa<STMT>(S);
   }
   }
 public:
 public:
   template <typename CHECKER>
   template <typename CHECKER>
@@ -105,11 +105,11 @@ template <typename STMT>
 class PostStmt {
 class PostStmt {
   template <typename CHECKER>
   template <typename CHECKER>
   static void _checkStmt(void *checker, const Stmt *S, CheckerContext &C) {
   static void _checkStmt(void *checker, const Stmt *S, CheckerContext &C) {
-    ((const CHECKER *)checker)->checkPostStmt(llvm::cast<STMT>(S), C);
+    ((const CHECKER *)checker)->checkPostStmt(cast<STMT>(S), C);
   }
   }
 
 
   static bool _handlesStmt(const Stmt *S) {
   static bool _handlesStmt(const Stmt *S) {
-    return llvm::isa<STMT>(S);
+    return isa<STMT>(S);
   }
   }
 public:
 public:
   template <typename CHECKER>
   template <typename CHECKER>

+ 1 - 1
include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h

@@ -122,7 +122,7 @@ public:
   /// Convenience method to query the state to see if a symbol is null or
   /// Convenience method to query the state to see if a symbol is null or
   /// not null, or if neither assumption can be made.
   /// not null, or if neither assumption can be made.
   ConditionTruthVal isNull(ProgramStateRef State, SymbolRef Sym) {
   ConditionTruthVal isNull(ProgramStateRef State, SymbolRef Sym) {
-    llvm::SaveAndRestore<bool> DisableNotify(NotifyAssumeClients, false);
+    SaveAndRestore<bool> DisableNotify(NotifyAssumeClients, false);
 
 
     return checkNull(State, Sym);
     return checkNull(State, Sym);
   }
   }

+ 3 - 3
include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h

@@ -463,7 +463,7 @@ public:
     bool operator!=(const iterator &X) const { return I != X.I; }
     bool operator!=(const iterator &X) const { return I != X.I; }
 
 
     const LabelDecl *getLabel() const {
     const LabelDecl *getLabel() const {
-      return llvm::cast<LabelStmt>((*I)->getLabel())->getDecl();
+      return cast<LabelStmt>((*I)->getLabel())->getDecl();
     }
     }
 
 
     const CFGBlock *getBlock() const {
     const CFGBlock *getBlock() const {
@@ -510,7 +510,7 @@ public:
     bool operator==(const iterator &X) const { return I == X.I; }
     bool operator==(const iterator &X) const { return I == X.I; }
 
 
     const CaseStmt *getCase() const {
     const CaseStmt *getCase() const {
-      return llvm::cast<CaseStmt>((*I)->getLabel());
+      return cast<CaseStmt>((*I)->getLabel());
     }
     }
 
 
     const CFGBlock *getBlock() const {
     const CFGBlock *getBlock() const {
@@ -522,7 +522,7 @@ public:
   iterator end() { return iterator(Src->succ_rend()); }
   iterator end() { return iterator(Src->succ_rend()); }
 
 
   const SwitchStmt *getSwitch() const {
   const SwitchStmt *getSwitch() const {
-    return llvm::cast<SwitchStmt>(Src->getTerminator());
+    return cast<SwitchStmt>(Src->getTerminator());
   }
   }
 
 
   ExplodedNode *generateCaseStmtNode(const iterator &I,
   ExplodedNode *generateCaseStmtNode(const iterator &I,

+ 1 - 1
include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h

@@ -432,7 +432,7 @@ public:
 
 
   template <typename REGION>
   template <typename REGION>
   const REGION* getRegionAs() const {
   const REGION* getRegionAs() const {
-    return llvm::dyn_cast<REGION>(getRegion());
+    return dyn_cast<REGION>(getRegion());
   }
   }
 
 
   inline bool operator==(const MemRegionVal& R) const {
   inline bool operator==(const MemRegionVal& R) const {

+ 1 - 1
include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h

@@ -96,7 +96,7 @@ public:
 };
 };
 
 
 typedef const SymExpr* SymbolRef;
 typedef const SymExpr* SymbolRef;
-typedef llvm::SmallVector<SymbolRef, 2> SymbolRefSmallVectorTy;
+typedef SmallVector<SymbolRef, 2> SymbolRefSmallVectorTy;
 
 
 typedef unsigned SymbolID;
 typedef unsigned SymbolID;
 /// \brief A symbol representing data which can be stored in a memory location
 /// \brief A symbol representing data which can be stored in a memory location

+ 1 - 1
include/clang/Tooling/CommonOptionsParser.h

@@ -79,7 +79,7 @@ public:
   static const char *const HelpMessage;
   static const char *const HelpMessage;
 
 
 private:
 private:
-  llvm::OwningPtr<CompilationDatabase> Compilations;
+  OwningPtr<CompilationDatabase> Compilations;
   std::vector<std::string> SourcePathList;
   std::vector<std::string> SourcePathList;
 };
 };
 
 

+ 1 - 1
include/clang/Tooling/CompilationDatabase.h

@@ -152,7 +152,7 @@ public:
   /// The argument list is meant to be compatible with normal llvm command line
   /// The argument list is meant to be compatible with normal llvm command line
   /// parsing in main methods.
   /// parsing in main methods.
   /// int main(int argc, char **argv) {
   /// int main(int argc, char **argv) {
-  ///   llvm::OwningPtr<FixedCompilationDatabase> Compilations(
+  ///   OwningPtr<FixedCompilationDatabase> Compilations(
   ///     FixedCompilationDatabase::loadFromCommandLine(argc, argv));
   ///     FixedCompilationDatabase::loadFromCommandLine(argc, argv));
   ///   cl::ParseCommandLineOptions(argc, argv);
   ///   cl::ParseCommandLineOptions(argc, argv);
   ///   ...
   ///   ...

+ 1 - 1
include/clang/Tooling/FileMatchTrie.h

@@ -76,7 +76,7 @@ public:
   /// matches, an empty \c StringRef is returned and a corresponding message
   /// matches, an empty \c StringRef is returned and a corresponding message
   /// written to 'Error'.
   /// written to 'Error'.
   StringRef findEquivalent(StringRef FileName,
   StringRef findEquivalent(StringRef FileName,
-                           llvm::raw_ostream &Error) const;
+                           raw_ostream &Error) const;
 private:
 private:
   FileMatchTrieNode *Root;
   FileMatchTrieNode *Root;
   OwningPtr<PathComparator> Comparator;
   OwningPtr<PathComparator> Comparator;

+ 1 - 1
include/clang/Tooling/JSONCompilationDatabase.h

@@ -104,7 +104,7 @@ private:
 
 
   FileMatchTrie MatchTrie;
   FileMatchTrie MatchTrie;
 
 
-  llvm::OwningPtr<llvm::MemoryBuffer> Database;
+  OwningPtr<llvm::MemoryBuffer> Database;
   llvm::SourceMgr SM;
   llvm::SourceMgr SM;
   llvm::yaml::Stream YAMLStream;
   llvm::yaml::Stream YAMLStream;
 };
 };

+ 8 - 8
include/clang/Tooling/Refactoring.h

@@ -47,22 +47,22 @@ public:
   /// \param FilePath A source file accessible via a SourceManager.
   /// \param FilePath A source file accessible via a SourceManager.
   /// \param Offset The byte offset of the start of the range in the file.
   /// \param Offset The byte offset of the start of the range in the file.
   /// \param Length The length of the range in bytes.
   /// \param Length The length of the range in bytes.
-  Replacement(llvm::StringRef FilePath, unsigned Offset,
-              unsigned Length, llvm::StringRef ReplacementText);
+  Replacement(StringRef FilePath, unsigned Offset,
+              unsigned Length, StringRef ReplacementText);
 
 
   /// \brief Creates a Replacement of the range [Start, Start+Length) with
   /// \brief Creates a Replacement of the range [Start, Start+Length) with
   /// ReplacementText.
   /// ReplacementText.
   Replacement(SourceManager &Sources, SourceLocation Start, unsigned Length,
   Replacement(SourceManager &Sources, SourceLocation Start, unsigned Length,
-              llvm::StringRef ReplacementText);
+              StringRef ReplacementText);
 
 
   /// \brief Creates a Replacement of the given range with ReplacementText.
   /// \brief Creates a Replacement of the given range with ReplacementText.
   Replacement(SourceManager &Sources, const CharSourceRange &Range,
   Replacement(SourceManager &Sources, const CharSourceRange &Range,
-              llvm::StringRef ReplacementText);
+              StringRef ReplacementText);
 
 
   /// \brief Creates a Replacement of the node with ReplacementText.
   /// \brief Creates a Replacement of the node with ReplacementText.
   template <typename Node>
   template <typename Node>
   Replacement(SourceManager &Sources, const Node &NodeToReplace,
   Replacement(SourceManager &Sources, const Node &NodeToReplace,
-              llvm::StringRef ReplacementText);
+              StringRef ReplacementText);
 
 
   /// \brief Returns whether this replacement can be applied to a file.
   /// \brief Returns whether this replacement can be applied to a file.
   ///
   ///
@@ -91,9 +91,9 @@ public:
 
 
  private:
  private:
   void setFromSourceLocation(SourceManager &Sources, SourceLocation Start,
   void setFromSourceLocation(SourceManager &Sources, SourceLocation Start,
-                             unsigned Length, llvm::StringRef ReplacementText);
+                             unsigned Length, StringRef ReplacementText);
   void setFromSourceRange(SourceManager &Sources, const CharSourceRange &Range,
   void setFromSourceRange(SourceManager &Sources, const CharSourceRange &Range,
-                          llvm::StringRef ReplacementText);
+                          StringRef ReplacementText);
 
 
   std::string FilePath;
   std::string FilePath;
   unsigned Offset;
   unsigned Offset;
@@ -152,7 +152,7 @@ private:
 
 
 template <typename Node>
 template <typename Node>
 Replacement::Replacement(SourceManager &Sources, const Node &NodeToReplace,
 Replacement::Replacement(SourceManager &Sources, const Node &NodeToReplace,
-                         llvm::StringRef ReplacementText) {
+                         StringRef ReplacementText) {
   const CharSourceRange Range =
   const CharSourceRange Range =
       CharSourceRange::getTokenRange(NodeToReplace->getSourceRange());
       CharSourceRange::getTokenRange(NodeToReplace->getSourceRange());
   setFromSourceRange(Sources, Range, ReplacementText);
   setFromSourceRange(Sources, Range, ReplacementText);

+ 3 - 3
include/clang/Tooling/Tooling.h

@@ -155,7 +155,7 @@ class ToolInvocation {
                      const clang::driver::ArgStringList &CC1Args);
                      const clang::driver::ArgStringList &CC1Args);
 
 
   std::vector<std::string> CommandLine;
   std::vector<std::string> CommandLine;
-  llvm::OwningPtr<FrontendAction> ToolAction;
+  OwningPtr<FrontendAction> ToolAction;
   FileManager *Files;
   FileManager *Files;
   // Maps <file name> -> <file content>.
   // Maps <file name> -> <file content>.
   llvm::StringMap<StringRef> MappedFileContents;
   llvm::StringMap<StringRef> MappedFileContents;
@@ -212,7 +212,7 @@ class ClangTool {
   // Contains a list of pairs (<file name>, <file content>).
   // Contains a list of pairs (<file name>, <file content>).
   std::vector< std::pair<StringRef, StringRef> > MappedFileContents;
   std::vector< std::pair<StringRef, StringRef> > MappedFileContents;
 
 
-  llvm::OwningPtr<ArgumentsAdjuster> ArgsAdjuster;
+  OwningPtr<ArgumentsAdjuster> ArgsAdjuster;
 };
 };
 
 
 template <typename T>
 template <typename T>
@@ -246,7 +246,7 @@ inline FrontendActionFactory *newFrontendActionFactory(
         : ConsumerFactory(ConsumerFactory), EndCallback(EndCallback) {}
         : ConsumerFactory(ConsumerFactory), EndCallback(EndCallback) {}
 
 
       clang::ASTConsumer *CreateASTConsumer(clang::CompilerInstance &,
       clang::ASTConsumer *CreateASTConsumer(clang::CompilerInstance &,
-                                            llvm::StringRef) {
+                                            StringRef) {
         return ConsumerFactory->newASTConsumer();
         return ConsumerFactory->newASTConsumer();
       }
       }
 
 

+ 2 - 2
lib/ARCMigrate/ARCMT.cpp

@@ -419,8 +419,8 @@ bool arcmt::getFileRemappingsFromFileList(
   bool hasErrorOccurred = false;
   bool hasErrorOccurred = false;
   llvm::StringMap<bool> Uniquer;
   llvm::StringMap<bool> Uniquer;
 
 
-  llvm::IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
-  llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags(
+  IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
+  IntrusiveRefCntPtr<DiagnosticsEngine> Diags(
       new DiagnosticsEngine(DiagID, new DiagnosticOptions,
       new DiagnosticsEngine(DiagID, new DiagnosticOptions,
                             DiagClient, /*ShouldOwnClient=*/false));
                             DiagClient, /*ShouldOwnClient=*/false));
 
 

+ 4 - 4
lib/ARCMigrate/ObjCMT.cpp

@@ -36,8 +36,8 @@ public:
   std::string MigrateDir;
   std::string MigrateDir;
   bool MigrateLiterals;
   bool MigrateLiterals;
   bool MigrateSubscripting;
   bool MigrateSubscripting;
-  llvm::OwningPtr<NSAPI> NSAPIObj;
-  llvm::OwningPtr<edit::EditedSource> Editor;
+  OwningPtr<NSAPI> NSAPIObj;
+  OwningPtr<edit::EditedSource> Editor;
   FileRemapper &Remapper;
   FileRemapper &Remapper;
   FileManager &FileMgr;
   FileManager &FileMgr;
   const PPConditionalDirectiveRecord *PPRec;
   const PPConditionalDirectiveRecord *PPRec;
@@ -193,13 +193,13 @@ void ObjCMigrateASTConsumer::HandleTranslationUnit(ASTContext &Ctx) {
     RewriteBuffer &buf = I->second;
     RewriteBuffer &buf = I->second;
     const FileEntry *file = Ctx.getSourceManager().getFileEntryForID(FID);
     const FileEntry *file = Ctx.getSourceManager().getFileEntryForID(FID);
     assert(file);
     assert(file);
-    llvm::SmallString<512> newText;
+    SmallString<512> newText;
     llvm::raw_svector_ostream vecOS(newText);
     llvm::raw_svector_ostream vecOS(newText);
     buf.write(vecOS);
     buf.write(vecOS);
     vecOS.flush();
     vecOS.flush();
     llvm::MemoryBuffer *memBuf = llvm::MemoryBuffer::getMemBufferCopy(
     llvm::MemoryBuffer *memBuf = llvm::MemoryBuffer::getMemBufferCopy(
                    StringRef(newText.data(), newText.size()), file->getName());
                    StringRef(newText.data(), newText.size()), file->getName());
-    llvm::SmallString<64> filePath(file->getName());
+    SmallString<64> filePath(file->getName());
     FileMgr.FixupRelativePath(filePath);
     FileMgr.FixupRelativePath(filePath);
     Remapper.remap(filePath.str(), memBuf);
     Remapper.remap(filePath.str(), memBuf);
   }
   }

+ 2 - 2
lib/ARCMigrate/TransProtectedScope.cpp

@@ -54,10 +54,10 @@ struct CaseInfo {
 
 
 class CaseCollector : public RecursiveASTVisitor<CaseCollector> {
 class CaseCollector : public RecursiveASTVisitor<CaseCollector> {
   ParentMap &PMap;
   ParentMap &PMap;
-  llvm::SmallVectorImpl<CaseInfo> &Cases;
+  SmallVectorImpl<CaseInfo> &Cases;
 
 
 public:
 public:
-  CaseCollector(ParentMap &PMap, llvm::SmallVectorImpl<CaseInfo> &Cases)
+  CaseCollector(ParentMap &PMap, SmallVectorImpl<CaseInfo> &Cases)
     : PMap(PMap), Cases(Cases) { }
     : PMap(PMap), Cases(Cases) { }
 
 
   bool VisitSwitchStmt(SwitchStmt *S) {
   bool VisitSwitchStmt(SwitchStmt *S) {

+ 2 - 2
lib/AST/ASTDiagnostic.cpp

@@ -396,7 +396,7 @@ class TemplateDiff {
   QualType ToType;
   QualType ToType;
 
 
   /// Str - Storage for the output stream.
   /// Str - Storage for the output stream.
-  llvm::SmallString<128> Str;
+  SmallString<128> Str;
 
 
   /// OS - The stream used to construct the output strings.
   /// OS - The stream used to construct the output strings.
   llvm::raw_svector_ostream OS;
   llvm::raw_svector_ostream OS;
@@ -452,7 +452,7 @@ class TemplateDiff {
     };
     };
 
 
     /// FlatTree - A flattened tree used to store the DiffNodes.
     /// FlatTree - A flattened tree used to store the DiffNodes.
-    llvm::SmallVector<DiffNode, 16> FlatTree;
+    SmallVector<DiffNode, 16> FlatTree;
 
 
     /// CurrentNode - The index of the current node being used.
     /// CurrentNode - The index of the current node being used.
     unsigned CurrentNode;
     unsigned CurrentNode;

+ 1 - 1
lib/AST/ASTDumper.cpp

@@ -521,7 +521,7 @@ void ASTDumper::VisitFunctionDecl(FunctionDecl *D) {
       D->getTemplateSpecializationInfo())
       D->getTemplateSpecializationInfo())
     dumpTemplateArgumentList(*FTSI->TemplateArguments);
     dumpTemplateArgumentList(*FTSI->TemplateArguments);
 
 
-  for (llvm::ArrayRef<NamedDecl*>::iterator
+  for (ArrayRef<NamedDecl *>::iterator
        I = D->getDeclsInPrototypeScope().begin(),
        I = D->getDeclsInPrototypeScope().begin(),
        E = D->getDeclsInPrototypeScope().end(); I != E; ++I)
        E = D->getDeclsInPrototypeScope().end(); I != E; ++I)
     dumpDecl(*I);
     dumpDecl(*I);

+ 15 - 15
lib/AST/ASTImporter.cpp

@@ -2213,7 +2213,7 @@ Decl *ASTNodeImporter::VisitNamespaceDecl(NamespaceDecl *D) {
       MergeWithNamespace = cast<NamespaceDecl>(DC)->getAnonymousNamespace();
       MergeWithNamespace = cast<NamespaceDecl>(DC)->getAnonymousNamespace();
   } else {
   } else {
     SmallVector<NamedDecl *, 4> ConflictingDecls;
     SmallVector<NamedDecl *, 4> ConflictingDecls;
-    llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+    SmallVector<NamedDecl *, 2> FoundDecls;
     DC->localUncachedLookup(Name, FoundDecls);
     DC->localUncachedLookup(Name, FoundDecls);
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
       if (!FoundDecls[I]->isInIdentifierNamespace(Decl::IDNS_Namespace))
       if (!FoundDecls[I]->isInIdentifierNamespace(Decl::IDNS_Namespace))
@@ -2276,7 +2276,7 @@ Decl *ASTNodeImporter::VisitTypedefNameDecl(TypedefNameDecl *D, bool IsAlias) {
   if (!DC->isFunctionOrMethod()) {
   if (!DC->isFunctionOrMethod()) {
     SmallVector<NamedDecl *, 4> ConflictingDecls;
     SmallVector<NamedDecl *, 4> ConflictingDecls;
     unsigned IDNS = Decl::IDNS_Ordinary;
     unsigned IDNS = Decl::IDNS_Ordinary;
-    llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+    SmallVector<NamedDecl *, 2> FoundDecls;
     DC->localUncachedLookup(Name, FoundDecls);
     DC->localUncachedLookup(Name, FoundDecls);
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
       if (!FoundDecls[I]->isInIdentifierNamespace(IDNS))
       if (!FoundDecls[I]->isInIdentifierNamespace(IDNS))
@@ -2356,7 +2356,7 @@ Decl *ASTNodeImporter::VisitEnumDecl(EnumDecl *D) {
   // We may already have an enum of the same name; try to find and match it.
   // We may already have an enum of the same name; try to find and match it.
   if (!DC->isFunctionOrMethod() && SearchName) {
   if (!DC->isFunctionOrMethod() && SearchName) {
     SmallVector<NamedDecl *, 4> ConflictingDecls;
     SmallVector<NamedDecl *, 4> ConflictingDecls;
-    llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+    SmallVector<NamedDecl *, 2> FoundDecls;
     DC->localUncachedLookup(SearchName, FoundDecls);
     DC->localUncachedLookup(SearchName, FoundDecls);
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
       if (!FoundDecls[I]->isInIdentifierNamespace(IDNS))
       if (!FoundDecls[I]->isInIdentifierNamespace(IDNS))
@@ -2442,7 +2442,7 @@ Decl *ASTNodeImporter::VisitRecordDecl(RecordDecl *D) {
   RecordDecl *AdoptDecl = 0;
   RecordDecl *AdoptDecl = 0;
   if (!DC->isFunctionOrMethod()) {
   if (!DC->isFunctionOrMethod()) {
     SmallVector<NamedDecl *, 4> ConflictingDecls;
     SmallVector<NamedDecl *, 4> ConflictingDecls;
-    llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+    SmallVector<NamedDecl *, 2> FoundDecls;
     DC->localUncachedLookup(SearchName, FoundDecls);
     DC->localUncachedLookup(SearchName, FoundDecls);
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
       if (!FoundDecls[I]->isInIdentifierNamespace(IDNS))
       if (!FoundDecls[I]->isInIdentifierNamespace(IDNS))
@@ -2549,7 +2549,7 @@ Decl *ASTNodeImporter::VisitEnumConstantDecl(EnumConstantDecl *D) {
   if (!LexicalDC->isFunctionOrMethod()) {
   if (!LexicalDC->isFunctionOrMethod()) {
     SmallVector<NamedDecl *, 4> ConflictingDecls;
     SmallVector<NamedDecl *, 4> ConflictingDecls;
     unsigned IDNS = Decl::IDNS_Ordinary;
     unsigned IDNS = Decl::IDNS_Ordinary;
-    llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+    SmallVector<NamedDecl *, 2> FoundDecls;
     DC->localUncachedLookup(Name, FoundDecls);
     DC->localUncachedLookup(Name, FoundDecls);
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
       if (!FoundDecls[I]->isInIdentifierNamespace(IDNS))
       if (!FoundDecls[I]->isInIdentifierNamespace(IDNS))
@@ -2601,7 +2601,7 @@ Decl *ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) {
   if (!LexicalDC->isFunctionOrMethod()) {
   if (!LexicalDC->isFunctionOrMethod()) {
     SmallVector<NamedDecl *, 4> ConflictingDecls;
     SmallVector<NamedDecl *, 4> ConflictingDecls;
     unsigned IDNS = Decl::IDNS_Ordinary;
     unsigned IDNS = Decl::IDNS_Ordinary;
-    llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+    SmallVector<NamedDecl *, 2> FoundDecls;
     DC->localUncachedLookup(Name, FoundDecls);
     DC->localUncachedLookup(Name, FoundDecls);
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
       if (!FoundDecls[I]->isInIdentifierNamespace(IDNS))
       if (!FoundDecls[I]->isInIdentifierNamespace(IDNS))
@@ -2811,7 +2811,7 @@ Decl *ASTNodeImporter::VisitFieldDecl(FieldDecl *D) {
     return 0;
     return 0;
   
   
   // Determine whether we've already imported this field. 
   // Determine whether we've already imported this field. 
-  llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+  SmallVector<NamedDecl *, 2> FoundDecls;
   DC->localUncachedLookup(Name, FoundDecls);
   DC->localUncachedLookup(Name, FoundDecls);
   for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
   for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     if (FieldDecl *FoundField = dyn_cast<FieldDecl>(FoundDecls[I])) {
     if (FieldDecl *FoundField = dyn_cast<FieldDecl>(FoundDecls[I])) {
@@ -2867,7 +2867,7 @@ Decl *ASTNodeImporter::VisitIndirectFieldDecl(IndirectFieldDecl *D) {
     return 0;
     return 0;
 
 
   // Determine whether we've already imported this field. 
   // Determine whether we've already imported this field. 
-  llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+  SmallVector<NamedDecl *, 2> FoundDecls;
   DC->localUncachedLookup(Name, FoundDecls);
   DC->localUncachedLookup(Name, FoundDecls);
   for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
   for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     if (IndirectFieldDecl *FoundField 
     if (IndirectFieldDecl *FoundField 
@@ -2932,7 +2932,7 @@ Decl *ASTNodeImporter::VisitObjCIvarDecl(ObjCIvarDecl *D) {
     return 0;
     return 0;
   
   
   // Determine whether we've already imported this ivar 
   // Determine whether we've already imported this ivar 
-  llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+  SmallVector<NamedDecl *, 2> FoundDecls;
   DC->localUncachedLookup(Name, FoundDecls);
   DC->localUncachedLookup(Name, FoundDecls);
   for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
   for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     if (ObjCIvarDecl *FoundIvar = dyn_cast<ObjCIvarDecl>(FoundDecls[I])) {
     if (ObjCIvarDecl *FoundIvar = dyn_cast<ObjCIvarDecl>(FoundDecls[I])) {
@@ -2987,7 +2987,7 @@ Decl *ASTNodeImporter::VisitVarDecl(VarDecl *D) {
     VarDecl *MergeWithVar = 0;
     VarDecl *MergeWithVar = 0;
     SmallVector<NamedDecl *, 4> ConflictingDecls;
     SmallVector<NamedDecl *, 4> ConflictingDecls;
     unsigned IDNS = Decl::IDNS_Ordinary;
     unsigned IDNS = Decl::IDNS_Ordinary;
-    llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+    SmallVector<NamedDecl *, 2> FoundDecls;
     DC->localUncachedLookup(Name, FoundDecls);
     DC->localUncachedLookup(Name, FoundDecls);
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
       if (!FoundDecls[I]->isInIdentifierNamespace(IDNS))
       if (!FoundDecls[I]->isInIdentifierNamespace(IDNS))
@@ -3163,7 +3163,7 @@ Decl *ASTNodeImporter::VisitObjCMethodDecl(ObjCMethodDecl *D) {
   if (ImportDeclParts(D, DC, LexicalDC, Name, Loc))
   if (ImportDeclParts(D, DC, LexicalDC, Name, Loc))
     return 0;
     return 0;
   
   
-  llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+  SmallVector<NamedDecl *, 2> FoundDecls;
   DC->localUncachedLookup(Name, FoundDecls);
   DC->localUncachedLookup(Name, FoundDecls);
   for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
   for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     if (ObjCMethodDecl *FoundMethod = dyn_cast<ObjCMethodDecl>(FoundDecls[I])) {
     if (ObjCMethodDecl *FoundMethod = dyn_cast<ObjCMethodDecl>(FoundDecls[I])) {
@@ -3410,7 +3410,7 @@ Decl *ASTNodeImporter::VisitObjCProtocolDecl(ObjCProtocolDecl *D) {
     return 0;
     return 0;
 
 
   ObjCProtocolDecl *MergeWithProtocol = 0;
   ObjCProtocolDecl *MergeWithProtocol = 0;
-  llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+  SmallVector<NamedDecl *, 2> FoundDecls;
   DC->localUncachedLookup(Name, FoundDecls);
   DC->localUncachedLookup(Name, FoundDecls);
   for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
   for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     if (!FoundDecls[I]->isInIdentifierNamespace(Decl::IDNS_ObjCProtocol))
     if (!FoundDecls[I]->isInIdentifierNamespace(Decl::IDNS_ObjCProtocol))
@@ -3557,7 +3557,7 @@ Decl *ASTNodeImporter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) {
 
 
   // Look for an existing interface with the same name.
   // Look for an existing interface with the same name.
   ObjCInterfaceDecl *MergeWithIface = 0;
   ObjCInterfaceDecl *MergeWithIface = 0;
-  llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+  SmallVector<NamedDecl *, 2> FoundDecls;
   DC->localUncachedLookup(Name, FoundDecls);
   DC->localUncachedLookup(Name, FoundDecls);
   for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
   for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     if (!FoundDecls[I]->isInIdentifierNamespace(Decl::IDNS_Ordinary))
     if (!FoundDecls[I]->isInIdentifierNamespace(Decl::IDNS_Ordinary))
@@ -3709,7 +3709,7 @@ Decl *ASTNodeImporter::VisitObjCPropertyDecl(ObjCPropertyDecl *D) {
     return 0;
     return 0;
 
 
   // Check whether we have already imported this property.
   // Check whether we have already imported this property.
-  llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+  SmallVector<NamedDecl *, 2> FoundDecls;
   DC->localUncachedLookup(Name, FoundDecls);
   DC->localUncachedLookup(Name, FoundDecls);
   for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
   for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     if (ObjCPropertyDecl *FoundProp
     if (ObjCPropertyDecl *FoundProp
@@ -3942,7 +3942,7 @@ Decl *ASTNodeImporter::VisitClassTemplateDecl(ClassTemplateDecl *D) {
   // We may already have a template of the same name; try to find and match it.
   // We may already have a template of the same name; try to find and match it.
   if (!DC->isFunctionOrMethod()) {
   if (!DC->isFunctionOrMethod()) {
     SmallVector<NamedDecl *, 4> ConflictingDecls;
     SmallVector<NamedDecl *, 4> ConflictingDecls;
-    llvm::SmallVector<NamedDecl *, 2> FoundDecls;
+    SmallVector<NamedDecl *, 2> FoundDecls;
     DC->localUncachedLookup(Name, FoundDecls);
     DC->localUncachedLookup(Name, FoundDecls);
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
     for (unsigned I = 0, N = FoundDecls.size(); I != N; ++I) {
       if (!FoundDecls[I]->isInIdentifierNamespace(Decl::IDNS_Ordinary))
       if (!FoundDecls[I]->isInIdentifierNamespace(Decl::IDNS_Ordinary))

+ 1 - 1
lib/AST/CommentDumper.cpp

@@ -244,7 +244,7 @@ void CommentDumper::visitFullComment(const FullComment *C) {
 
 
 } // unnamed namespace
 } // unnamed namespace
 
 
-void Comment::dump(llvm::raw_ostream &OS, const CommandTraits *Traits,
+void Comment::dump(raw_ostream &OS, const CommandTraits *Traits,
                    const SourceManager *SM) const {
                    const SourceManager *SM) const {
   const FullComment *FC = dyn_cast<FullComment>(this);
   const FullComment *FC = dyn_cast<FullComment>(this);
   CommentDumper D(llvm::errs(), Traits, SM, FC);
   CommentDumper D(llvm::errs(), Traits, SM, FC);

+ 3 - 3
lib/AST/CommentSema.cpp

@@ -560,11 +560,11 @@ void Sema::resolveParamCommandIndexes(const FullComment *FC) {
     return;
     return;
   }
   }
 
 
-  llvm::SmallVector<ParamCommandComment *, 8> UnresolvedParamCommands;
+  SmallVector<ParamCommandComment *, 8> UnresolvedParamCommands;
 
 
   // Comment AST nodes that correspond to \c ParamVars for which we have
   // Comment AST nodes that correspond to \c ParamVars for which we have
   // found a \\param command or NULL if no documentation was found so far.
   // found a \\param command or NULL if no documentation was found so far.
-  llvm::SmallVector<ParamCommandComment *, 8> ParamVarDocs;
+  SmallVector<ParamCommandComment *, 8> ParamVarDocs;
 
 
   ArrayRef<const ParmVarDecl *> ParamVars = getParamVars();
   ArrayRef<const ParmVarDecl *> ParamVars = getParamVars();
   ParamVarDocs.resize(ParamVars.size(), NULL);
   ParamVarDocs.resize(ParamVars.size(), NULL);
@@ -597,7 +597,7 @@ void Sema::resolveParamCommandIndexes(const FullComment *FC) {
   }
   }
 
 
   // Find parameter declarations that have no corresponding \\param.
   // Find parameter declarations that have no corresponding \\param.
-  llvm::SmallVector<const ParmVarDecl *, 8> OrphanedParamDecls;
+  SmallVector<const ParmVarDecl *, 8> OrphanedParamDecls;
   for (unsigned i = 0, e = ParamVarDocs.size(); i != e; ++i) {
   for (unsigned i = 0, e = ParamVarDocs.size(); i != e; ++i) {
     if (!ParamVarDocs[i])
     if (!ParamVarDocs[i])
       OrphanedParamDecls.push_back(ParamVars[i]);
       OrphanedParamDecls.push_back(ParamVars[i]);

+ 7 - 7
lib/AST/Decl.cpp

@@ -1454,12 +1454,12 @@ EvaluatedStmt *VarDecl::ensureEvaluatedStmt() const {
 }
 }
 
 
 APValue *VarDecl::evaluateValue() const {
 APValue *VarDecl::evaluateValue() const {
-  llvm::SmallVector<PartialDiagnosticAt, 8> Notes;
+  SmallVector<PartialDiagnosticAt, 8> Notes;
   return evaluateValue(Notes);
   return evaluateValue(Notes);
 }
 }
 
 
 APValue *VarDecl::evaluateValue(
 APValue *VarDecl::evaluateValue(
-    llvm::SmallVectorImpl<PartialDiagnosticAt> &Notes) const {
+    SmallVectorImpl<PartialDiagnosticAt> &Notes) const {
   EvaluatedStmt *Eval = ensureEvaluatedStmt();
   EvaluatedStmt *Eval = ensureEvaluatedStmt();
 
 
   // We only produce notes indicating why an initializer is non-constant the
   // We only produce notes indicating why an initializer is non-constant the
@@ -1517,7 +1517,7 @@ bool VarDecl::checkInitIsICE() const {
   // In C++11, evaluate the initializer to check whether it's a constant
   // In C++11, evaluate the initializer to check whether it's a constant
   // expression.
   // expression.
   if (getASTContext().getLangOpts().CPlusPlus11) {
   if (getASTContext().getLangOpts().CPlusPlus11) {
-    llvm::SmallVector<PartialDiagnosticAt, 8> Notes;
+    SmallVector<PartialDiagnosticAt, 8> Notes;
     evaluateValue(Notes);
     evaluateValue(Notes);
     return Eval->IsICE;
     return Eval->IsICE;
   }
   }
@@ -1899,7 +1899,7 @@ unsigned FunctionDecl::getNumParams() const {
 }
 }
 
 
 void FunctionDecl::setParams(ASTContext &C,
 void FunctionDecl::setParams(ASTContext &C,
-                             llvm::ArrayRef<ParmVarDecl *> NewParamInfo) {
+                             ArrayRef<ParmVarDecl *> NewParamInfo) {
   assert(ParamInfo == 0 && "Already has param info!");
   assert(ParamInfo == 0 && "Already has param info!");
   assert(NewParamInfo.size() == getNumParams() && "Parameter count mismatch!");
   assert(NewParamInfo.size() == getNumParams() && "Parameter count mismatch!");
 
 
@@ -1910,13 +1910,13 @@ void FunctionDecl::setParams(ASTContext &C,
   }
   }
 }
 }
 
 
-void FunctionDecl::setDeclsInPrototypeScope(llvm::ArrayRef<NamedDecl *> NewDecls) {
+void FunctionDecl::setDeclsInPrototypeScope(ArrayRef<NamedDecl *> NewDecls) {
   assert(DeclsInPrototypeScope.empty() && "Already has prototype decls!");
   assert(DeclsInPrototypeScope.empty() && "Already has prototype decls!");
 
 
   if (!NewDecls.empty()) {
   if (!NewDecls.empty()) {
     NamedDecl **A = new (getASTContext()) NamedDecl*[NewDecls.size()];
     NamedDecl **A = new (getASTContext()) NamedDecl*[NewDecls.size()];
     std::copy(NewDecls.begin(), NewDecls.end(), A);
     std::copy(NewDecls.begin(), NewDecls.end(), A);
-    DeclsInPrototypeScope = llvm::ArrayRef<NamedDecl*>(A, NewDecls.size());
+    DeclsInPrototypeScope = ArrayRef<NamedDecl *>(A, NewDecls.size());
   }
   }
 }
 }
 
 
@@ -2840,7 +2840,7 @@ void RecordDecl::LoadFieldsFromExternalStorage() const {
 // BlockDecl Implementation
 // BlockDecl Implementation
 //===----------------------------------------------------------------------===//
 //===----------------------------------------------------------------------===//
 
 
-void BlockDecl::setParams(llvm::ArrayRef<ParmVarDecl *> NewParamInfo) {
+void BlockDecl::setParams(ArrayRef<ParmVarDecl *> NewParamInfo) {
   assert(ParamInfo == 0 && "Already has param info!");
   assert(ParamInfo == 0 && "Already has param info!");
 
 
   // Zero params -> null pointer.
   // Zero params -> null pointer.

+ 4 - 4
lib/AST/DeclBase.cpp

@@ -875,7 +875,7 @@ DeclContext *DeclContext::getPrimaryContext() {
 }
 }
 
 
 void 
 void 
-DeclContext::collectAllContexts(llvm::SmallVectorImpl<DeclContext *> &Contexts){
+DeclContext::collectAllContexts(SmallVectorImpl<DeclContext *> &Contexts){
   Contexts.clear();
   Contexts.clear();
   
   
   if (DeclKind != Decl::Namespace) {
   if (DeclKind != Decl::Namespace) {
@@ -1130,7 +1130,7 @@ StoredDeclsMap *DeclContext::buildLookup() {
   if (!LookupPtr.getInt())
   if (!LookupPtr.getInt())
     return LookupPtr.getPointer();
     return LookupPtr.getPointer();
 
 
-  llvm::SmallVector<DeclContext *, 2> Contexts;
+  SmallVector<DeclContext *, 2> Contexts;
   collectAllContexts(Contexts);
   collectAllContexts(Contexts);
   for (unsigned I = 0, N = Contexts.size(); I != N; ++I)
   for (unsigned I = 0, N = Contexts.size(); I != N; ++I)
     buildLookupImpl(Contexts[I]);
     buildLookupImpl(Contexts[I]);
@@ -1203,8 +1203,8 @@ DeclContext::lookup(DeclarationName Name) {
   return I->second.getLookupResult();
   return I->second.getLookupResult();
 }
 }
 
 
-void DeclContext::localUncachedLookup(DeclarationName Name, 
-                                  llvm::SmallVectorImpl<NamedDecl *> &Results) {
+void DeclContext::localUncachedLookup(DeclarationName Name,
+                                      SmallVectorImpl<NamedDecl *> &Results) {
   Results.clear();
   Results.clear();
   
   
   // If there's no external storage, just perform a normal lookup and copy
   // If there's no external storage, just perform a normal lookup and copy

+ 2 - 2
lib/AST/DeclTemplate.cpp

@@ -132,7 +132,7 @@ RedeclarableTemplateDecl::CommonBase *RedeclarableTemplateDecl::getCommonPtr() {
   if (!Common) {
   if (!Common) {
     // Walk the previous-declaration chain until we either find a declaration
     // Walk the previous-declaration chain until we either find a declaration
     // with a common pointer or we run out of previous declarations.
     // with a common pointer or we run out of previous declarations.
-    llvm::SmallVector<RedeclarableTemplateDecl *, 2> PrevDecls;
+    SmallVector<RedeclarableTemplateDecl *, 2> PrevDecls;
     for (RedeclarableTemplateDecl *Prev = getPreviousDecl(); Prev;
     for (RedeclarableTemplateDecl *Prev = getPreviousDecl(); Prev;
          Prev = Prev->getPreviousDecl()) {
          Prev = Prev->getPreviousDecl()) {
       if (Prev->Common) {
       if (Prev->Common) {
@@ -620,7 +620,7 @@ TemplateTemplateParmDecl::Create(const ASTContext &C, DeclContext *DC,
                                  SourceLocation L, unsigned D, unsigned P,
                                  SourceLocation L, unsigned D, unsigned P,
                                  IdentifierInfo *Id,
                                  IdentifierInfo *Id,
                                  TemplateParameterList *Params,
                                  TemplateParameterList *Params,
-                            llvm::ArrayRef<TemplateParameterList*> Expansions) {
+                                 ArrayRef<TemplateParameterList *> Expansions) {
   void *Mem = C.Allocate(sizeof(TemplateTemplateParmDecl) +
   void *Mem = C.Allocate(sizeof(TemplateTemplateParmDecl) +
                          sizeof(TemplateParameterList*) * Expansions.size());
                          sizeof(TemplateParameterList*) * Expansions.size());
   return new (Mem) TemplateTemplateParmDecl(DC, L, D, P, Id, Params,
   return new (Mem) TemplateTemplateParmDecl(DC, L, D, P, Id, Params,

+ 2 - 2
lib/AST/DumpXML.cpp

@@ -499,8 +499,8 @@ struct XMLDumper : public XMLDeclVisitor<XMLDumper>,
     for (FunctionDecl::param_iterator
     for (FunctionDecl::param_iterator
            I = D->param_begin(), E = D->param_end(); I != E; ++I)
            I = D->param_begin(), E = D->param_end(); I != E; ++I)
       dispatch(*I);
       dispatch(*I);
-    for (llvm::ArrayRef<NamedDecl*>::iterator
-           I = D->getDeclsInPrototypeScope().begin(), E = D->getDeclsInPrototypeScope().end();
+    for (ArrayRef<NamedDecl *>::iterator I = D->getDeclsInPrototypeScope().begin(),
+                                         E = D->getDeclsInPrototypeScope().end();
          I != E; ++I)
          I != E; ++I)
       dispatch(*I);
       dispatch(*I);
     if (D->doesThisDeclarationHaveABody())
     if (D->doesThisDeclarationHaveABody())

+ 3 - 3
lib/AST/Expr.cpp

@@ -2566,7 +2566,7 @@ bool Expr::isImplicitCXXThis() const {
 
 
 /// hasAnyTypeDependentArguments - Determines if any of the expressions
 /// hasAnyTypeDependentArguments - Determines if any of the expressions
 /// in Exprs is type-dependent.
 /// in Exprs is type-dependent.
-bool Expr::hasAnyTypeDependentArguments(llvm::ArrayRef<Expr *> Exprs) {
+bool Expr::hasAnyTypeDependentArguments(ArrayRef<Expr *> Exprs) {
   for (unsigned I = 0; I < Exprs.size(); ++I)
   for (unsigned I = 0; I < Exprs.size(); ++I)
     if (Exprs[I]->isTypeDependent())
     if (Exprs[I]->isTypeDependent())
       return true;
       return true;
@@ -3884,7 +3884,7 @@ Stmt::child_range ObjCMessageExpr::children() {
                      reinterpret_cast<Stmt **>(getArgs() + getNumArgs()));
                      reinterpret_cast<Stmt **>(getArgs() + getNumArgs()));
 }
 }
 
 
-ObjCArrayLiteral::ObjCArrayLiteral(llvm::ArrayRef<Expr *> Elements, 
+ObjCArrayLiteral::ObjCArrayLiteral(ArrayRef<Expr *> Elements, 
                                    QualType T, ObjCMethodDecl *Method,
                                    QualType T, ObjCMethodDecl *Method,
                                    SourceRange SR)
                                    SourceRange SR)
   : Expr(ObjCArrayLiteralClass, T, VK_RValue, OK_Ordinary, 
   : Expr(ObjCArrayLiteralClass, T, VK_RValue, OK_Ordinary, 
@@ -3905,7 +3905,7 @@ ObjCArrayLiteral::ObjCArrayLiteral(llvm::ArrayRef<Expr *> Elements,
 }
 }
 
 
 ObjCArrayLiteral *ObjCArrayLiteral::Create(ASTContext &C, 
 ObjCArrayLiteral *ObjCArrayLiteral::Create(ASTContext &C, 
-                                           llvm::ArrayRef<Expr *> Elements,
+                                           ArrayRef<Expr *> Elements,
                                            QualType T, ObjCMethodDecl * Method,
                                            QualType T, ObjCMethodDecl * Method,
                                            SourceRange SR) {
                                            SourceRange SR) {
   void *Mem = C.Allocate(sizeof(ObjCArrayLiteral) 
   void *Mem = C.Allocate(sizeof(ObjCArrayLiteral) 

+ 1 - 1
lib/AST/ExprCXX.cpp

@@ -1339,7 +1339,7 @@ FunctionParmPackExpr::FunctionParmPackExpr(QualType T, ParmVarDecl *ParamPack,
 FunctionParmPackExpr *
 FunctionParmPackExpr *
 FunctionParmPackExpr::Create(ASTContext &Context, QualType T,
 FunctionParmPackExpr::Create(ASTContext &Context, QualType T,
                              ParmVarDecl *ParamPack, SourceLocation NameLoc,
                              ParmVarDecl *ParamPack, SourceLocation NameLoc,
-                             llvm::ArrayRef<Decl*> Params) {
+                             ArrayRef<Decl *> Params) {
   return new (Context.Allocate(sizeof(FunctionParmPackExpr) +
   return new (Context.Allocate(sizeof(FunctionParmPackExpr) +
                                sizeof(ParmVarDecl*) * Params.size()))
                                sizeof(ParmVarDecl*) * Params.size()))
     FunctionParmPackExpr(T, ParamPack, NameLoc, Params.size(), Params.data());
     FunctionParmPackExpr(T, ParamPack, NameLoc, Params.size(), Params.data());

+ 14 - 15
lib/AST/ExprConstant.cpp

@@ -318,7 +318,7 @@ namespace {
 
 
     OptionalDiagnostic &operator<<(const APSInt &I) {
     OptionalDiagnostic &operator<<(const APSInt &I) {
       if (Diag) {
       if (Diag) {
-        llvm::SmallVector<char, 32> Buffer;
+        SmallVector<char, 32> Buffer;
         I.toString(Buffer);
         I.toString(Buffer);
         *Diag << StringRef(Buffer.data(), Buffer.size());
         *Diag << StringRef(Buffer.data(), Buffer.size());
       }
       }
@@ -327,7 +327,7 @@ namespace {
 
 
     OptionalDiagnostic &operator<<(const APFloat &F) {
     OptionalDiagnostic &operator<<(const APFloat &F) {
       if (Diag) {
       if (Diag) {
-        llvm::SmallVector<char, 32> Buffer;
+        SmallVector<char, 32> Buffer;
         F.toString(Buffer);
         F.toString(Buffer);
         *Diag << StringRef(Buffer.data(), Buffer.size());
         *Diag << StringRef(Buffer.data(), Buffer.size());
       }
       }
@@ -535,8 +535,7 @@ namespace {
 
 
   public:
   public:
     SpeculativeEvaluationRAII(EvalInfo &Info,
     SpeculativeEvaluationRAII(EvalInfo &Info,
-                              llvm::SmallVectorImpl<PartialDiagnosticAt>
-                                *NewDiag = 0)
+                              SmallVectorImpl<PartialDiagnosticAt> *NewDiag = 0)
       : Info(Info), Old(Info.EvalStatus) {
       : Info(Info), Old(Info.EvalStatus) {
       Info.EvalStatus.Diag = NewDiag;
       Info.EvalStatus.Diag = NewDiag;
     }
     }
@@ -587,7 +586,7 @@ CallStackFrame::~CallStackFrame() {
 }
 }
 
 
 /// Produce a string describing the given constexpr call.
 /// Produce a string describing the given constexpr call.
-static void describeCall(CallStackFrame *Frame, llvm::raw_ostream &Out) {
+static void describeCall(CallStackFrame *Frame, raw_ostream &Out) {
   unsigned ArgIndex = 0;
   unsigned ArgIndex = 0;
   bool IsMemberCall = isa<CXXMethodDecl>(Frame->Callee) &&
   bool IsMemberCall = isa<CXXMethodDecl>(Frame->Callee) &&
                       !isa<CXXConstructorDecl>(Frame->Callee) &&
                       !isa<CXXConstructorDecl>(Frame->Callee) &&
@@ -635,7 +634,7 @@ void EvalInfo::addCallStack(unsigned Limit) {
       continue;
       continue;
     }
     }
 
 
-    llvm::SmallVector<char, 128> Buffer;
+    SmallVector<char, 128> Buffer;
     llvm::raw_svector_ostream Out(Buffer);
     llvm::raw_svector_ostream Out(Buffer);
     describeCall(Frame, Out);
     describeCall(Frame, Out);
     addDiag(Frame->CallLoc, diag::note_constexpr_call_here) << Out.str();
     addDiag(Frame->CallLoc, diag::note_constexpr_call_here) << Out.str();
@@ -1463,7 +1462,7 @@ static bool EvaluateVarDeclInit(EvalInfo &Info, const Expr *E,
 
 
   // Check that we can fold the initializer. In C++, we will have already done
   // Check that we can fold the initializer. In C++, we will have already done
   // this in the cases where it matters for conformance.
   // this in the cases where it matters for conformance.
-  llvm::SmallVector<PartialDiagnosticAt, 8> Notes;
+  SmallVector<PartialDiagnosticAt, 8> Notes;
   if (!VD->evaluateValue(Notes)) {
   if (!VD->evaluateValue(Notes)) {
     Info.Diag(E, diag::note_constexpr_var_init_non_constant,
     Info.Diag(E, diag::note_constexpr_var_init_non_constant,
               Notes.size() + 1) << VD;
               Notes.size() + 1) << VD;
@@ -2312,7 +2311,7 @@ private:
 
 
     // Speculatively evaluate both arms.
     // Speculatively evaluate both arms.
     {
     {
-      llvm::SmallVector<PartialDiagnosticAt, 8> Diag;
+      SmallVector<PartialDiagnosticAt, 8> Diag;
       SpeculativeEvaluationRAII Speculate(Info, &Diag);
       SpeculativeEvaluationRAII Speculate(Info, &Diag);
 
 
       StmtVisitorTy::Visit(E->getFalseExpr());
       StmtVisitorTy::Visit(E->getFalseExpr());
@@ -2483,7 +2482,7 @@ public:
 
 
     const FunctionDecl *FD = 0;
     const FunctionDecl *FD = 0;
     LValue *This = 0, ThisVal;
     LValue *This = 0, ThisVal;
-    llvm::ArrayRef<const Expr*> Args(E->getArgs(), E->getNumArgs());
+    ArrayRef<const Expr *> Args(E->getArgs(), E->getNumArgs());
     bool HasQualifier = false;
     bool HasQualifier = false;
 
 
     // Extract function decl and 'this' pointer from the callee.
     // Extract function decl and 'this' pointer from the callee.
@@ -3488,7 +3487,7 @@ bool RecordExprEvaluator::VisitCXXConstructExpr(const CXXConstructExpr *E) {
   if (ZeroInit && !ZeroInitialization(E))
   if (ZeroInit && !ZeroInitialization(E))
     return false;
     return false;
 
 
-  llvm::ArrayRef<const Expr*> Args(E->getArgs(), E->getNumArgs());
+  ArrayRef<const Expr *> Args(E->getArgs(), E->getNumArgs());
   return HandleConstructorCall(E->getExprLoc(), This, Args,
   return HandleConstructorCall(E->getExprLoc(), This, Args,
                                cast<CXXConstructorDecl>(Definition), Info,
                                cast<CXXConstructorDecl>(Definition), Info,
                                Result);
                                Result);
@@ -3899,7 +3898,7 @@ bool ArrayExprEvaluator::VisitCXXConstructExpr(const CXXConstructExpr *E) {
       return false;
       return false;
   }
   }
 
 
-  llvm::ArrayRef<const Expr*> Args(E->getArgs(), E->getNumArgs());
+  ArrayRef<const Expr *> Args(E->getArgs(), E->getNumArgs());
   return HandleConstructorCall(E->getExprLoc(), Subobject, Args,
   return HandleConstructorCall(E->getExprLoc(), Subobject, Args,
                                cast<CXXConstructorDecl>(Definition),
                                cast<CXXConstructorDecl>(Definition),
                                Info, *Value);
                                Info, *Value);
@@ -6320,7 +6319,7 @@ bool Expr::EvaluateAsLValue(EvalResult &Result, const ASTContext &Ctx) const {
 
 
 bool Expr::EvaluateAsInitializer(APValue &Value, const ASTContext &Ctx,
 bool Expr::EvaluateAsInitializer(APValue &Value, const ASTContext &Ctx,
                                  const VarDecl *VD,
                                  const VarDecl *VD,
-                      llvm::SmallVectorImpl<PartialDiagnosticAt> &Notes) const {
+                            SmallVectorImpl<PartialDiagnosticAt> &Notes) const {
   // FIXME: Evaluating initializers for large array and record types can cause
   // FIXME: Evaluating initializers for large array and record types can cause
   // performance problems. Only do so in C++11 for now.
   // performance problems. Only do so in C++11 for now.
   if (isRValue() && (getType()->isArrayType() || getType()->isRecordType()) &&
   if (isRValue() && (getType()->isArrayType() || getType()->isRecordType()) &&
@@ -6365,7 +6364,7 @@ bool Expr::isEvaluatable(const ASTContext &Ctx) const {
 }
 }
 
 
 APSInt Expr::EvaluateKnownConstInt(const ASTContext &Ctx,
 APSInt Expr::EvaluateKnownConstInt(const ASTContext &Ctx,
-               llvm::SmallVectorImpl<PartialDiagnosticAt> *Diag) const {
+                    SmallVectorImpl<PartialDiagnosticAt> *Diag) const {
   EvalResult EvalResult;
   EvalResult EvalResult;
   EvalResult.Diag = Diag;
   EvalResult.Diag = Diag;
   bool Result = EvaluateAsRValue(EvalResult, Ctx);
   bool Result = EvaluateAsRValue(EvalResult, Ctx);
@@ -6843,7 +6842,7 @@ bool Expr::isCXX11ConstantExpr(ASTContext &Ctx, APValue *Result,
 
 
   // Build evaluation settings.
   // Build evaluation settings.
   Expr::EvalStatus Status;
   Expr::EvalStatus Status;
-  llvm::SmallVector<PartialDiagnosticAt, 8> Diags;
+  SmallVector<PartialDiagnosticAt, 8> Diags;
   Status.Diag = &Diags;
   Status.Diag = &Diags;
   EvalInfo Info(Ctx, Status);
   EvalInfo Info(Ctx, Status);
 
 
@@ -6862,7 +6861,7 @@ bool Expr::isCXX11ConstantExpr(ASTContext &Ctx, APValue *Result,
 }
 }
 
 
 bool Expr::isPotentialConstantExpr(const FunctionDecl *FD,
 bool Expr::isPotentialConstantExpr(const FunctionDecl *FD,
-                                   llvm::SmallVectorImpl<
+                                   SmallVectorImpl<
                                      PartialDiagnosticAt> &Diags) {
                                      PartialDiagnosticAt> &Diags) {
   // FIXME: It would be useful to check constexpr function templates, but at the
   // FIXME: It would be useful to check constexpr function templates, but at the
   // moment the constant expression evaluator cannot cope with the non-rigorous
   // moment the constant expression evaluator cannot cope with the non-rigorous

+ 1 - 1
lib/AST/ItaniumMangle.cpp

@@ -657,7 +657,7 @@ void CXXNameMangler::mangleFloat(const llvm::APFloat &f) {
   assert(numCharacters != 0);
   assert(numCharacters != 0);
 
 
   // Allocate a buffer of the right number of characters.
   // Allocate a buffer of the right number of characters.
-  llvm::SmallVector<char, 20> buffer;
+  SmallVector<char, 20> buffer;
   buffer.set_size(numCharacters);
   buffer.set_size(numCharacters);
 
 
   // Fill the buffer left-to-right.
   // Fill the buffer left-to-right.

+ 4 - 4
lib/ASTMatchers/ASTMatchFinder.cpp

@@ -40,7 +40,7 @@ typedef MatchFinder::MatchCallback MatchCallback;
 class ParentMapASTVisitor : public RecursiveASTVisitor<ParentMapASTVisitor> {
 class ParentMapASTVisitor : public RecursiveASTVisitor<ParentMapASTVisitor> {
 public:
 public:
   /// \brief Contains parents of a node.
   /// \brief Contains parents of a node.
-  typedef llvm::SmallVector<ast_type_traits::DynTypedNode, 1> ParentVector;
+  typedef SmallVector<ast_type_traits::DynTypedNode, 1> ParentVector;
 
 
   /// \brief Maps from a node to its parents.
   /// \brief Maps from a node to its parents.
   typedef llvm::DenseMap<const void *, ParentVector> ParentMap;
   typedef llvm::DenseMap<const void *, ParentVector> ParentMap;
@@ -94,7 +94,7 @@ private:
   }
   }
 
 
   ParentMap *Parents;
   ParentMap *Parents;
-  llvm::SmallVector<ast_type_traits::DynTypedNode, 16> ParentStack;
+  SmallVector<ast_type_traits::DynTypedNode, 16> ParentStack;
 
 
   friend class RecursiveASTVisitor<ParentMapASTVisitor>;
   friend class RecursiveASTVisitor<ParentMapASTVisitor>;
 };
 };
@@ -573,7 +573,7 @@ private:
   typedef llvm::DenseMap<UntypedMatchInput, MemoizedMatchResult> MemoizationMap;
   typedef llvm::DenseMap<UntypedMatchInput, MemoizedMatchResult> MemoizationMap;
   MemoizationMap ResultCache;
   MemoizationMap ResultCache;
 
 
-  llvm::OwningPtr<ParentMapASTVisitor::ParentMap> Parents;
+  OwningPtr<ParentMapASTVisitor::ParentMap> Parents;
 };
 };
 
 
 // Returns true if the given class is directly or indirectly derived
 // Returns true if the given class is directly or indirectly derived
@@ -622,7 +622,7 @@ bool MatchASTVisitor::classIsDerivedFrom(const CXXRecordDecl *Declaration,
       if (SpecializationDecl != NULL) {
       if (SpecializationDecl != NULL) {
         ClassDecl = SpecializationDecl;
         ClassDecl = SpecializationDecl;
       } else {
       } else {
-        ClassDecl = llvm::dyn_cast<CXXRecordDecl>(
+        ClassDecl = dyn_cast<CXXRecordDecl>(
             TemplateType->getTemplateName()
             TemplateType->getTemplateName()
                 .getAsTemplateDecl()->getTemplatedDecl());
                 .getAsTemplateDecl()->getTemplatedDecl());
       }
       }

+ 2 - 2
lib/Analysis/ReachableCode.cpp

@@ -29,9 +29,9 @@ namespace {
 class DeadCodeScan {
 class DeadCodeScan {
   llvm::BitVector Visited;
   llvm::BitVector Visited;
   llvm::BitVector &Reachable;
   llvm::BitVector &Reachable;
-  llvm::SmallVector<const CFGBlock *, 10> WorkList;
+  SmallVector<const CFGBlock *, 10> WorkList;
   
   
-  typedef llvm::SmallVector<std::pair<const CFGBlock *, const Stmt *>, 12>
+  typedef SmallVector<std::pair<const CFGBlock *, const Stmt *>, 12>
       DeferredLocsTy;
       DeferredLocsTy;
   
   
   DeferredLocsTy DeferredLocs;
   DeferredLocsTy DeferredLocs;

+ 1 - 1
lib/Analysis/ThreadSafety.cpp

@@ -2343,7 +2343,7 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) {
     // union because the real error is probably that we forgot to unlock M on
     // union because the real error is probably that we forgot to unlock M on
     // all code paths.
     // all code paths.
     bool LocksetInitialized = false;
     bool LocksetInitialized = false;
-    llvm::SmallVector<CFGBlock*, 8> SpecialBlocks;
+    SmallVector<CFGBlock *, 8> SpecialBlocks;
     for (CFGBlock::const_pred_iterator PI = CurrBlock->pred_begin(),
     for (CFGBlock::const_pred_iterator PI = CurrBlock->pred_begin(),
          PE  = CurrBlock->pred_end(); PI != PE; ++PI) {
          PE  = CurrBlock->pred_end(); PI != PE; ++PI) {
 
 

+ 2 - 2
lib/Analysis/UninitializedValues.cpp

@@ -509,8 +509,8 @@ public:
     // 'n' is definitely uninitialized for two edges into block 7 (from blocks 2
     // 'n' is definitely uninitialized for two edges into block 7 (from blocks 2
     // and 4), so we report that any time either of those edges is taken (in
     // and 4), so we report that any time either of those edges is taken (in
     // each case when 'b == false'), 'n' is used uninitialized.
     // each case when 'b == false'), 'n' is used uninitialized.
-    llvm::SmallVector<const CFGBlock*, 32> Queue;
-    llvm::SmallVector<unsigned, 32> SuccsVisited(cfg.getNumBlockIDs(), 0);
+    SmallVector<const CFGBlock*, 32> Queue;
+    SmallVector<unsigned, 32> SuccsVisited(cfg.getNumBlockIDs(), 0);
     Queue.push_back(block);
     Queue.push_back(block);
     // Specify that we've already visited all successors of the starting block.
     // Specify that we've already visited all successors of the starting block.
     // This has the dual purpose of ensuring we never add it to the queue, and
     // This has the dual purpose of ensuring we never add it to the queue, and

+ 4 - 4
lib/Basic/Diagnostic.cpp

@@ -234,7 +234,7 @@ bool DiagnosticsEngine::setDiagnosticGroupMapping(
   StringRef Group, diag::Mapping Map, SourceLocation Loc)
   StringRef Group, diag::Mapping Map, SourceLocation Loc)
 {
 {
   // Get the diagnostics in this group.
   // Get the diagnostics in this group.
-  llvm::SmallVector<diag::kind, 8> GroupDiags;
+  SmallVector<diag::kind, 8> GroupDiags;
   if (Diags->getDiagnosticsInGroup(Group, GroupDiags))
   if (Diags->getDiagnosticsInGroup(Group, GroupDiags))
     return true;
     return true;
 
 
@@ -274,7 +274,7 @@ bool DiagnosticsEngine::setDiagnosticGroupWarningAsError(StringRef Group,
   // potentially downgrade anything already mapped to be a warning.
   // potentially downgrade anything already mapped to be a warning.
 
 
   // Get the diagnostics in this group.
   // Get the diagnostics in this group.
-  llvm::SmallVector<diag::kind, 8> GroupDiags;
+  SmallVector<diag::kind, 8> GroupDiags;
   if (Diags->getDiagnosticsInGroup(Group, GroupDiags))
   if (Diags->getDiagnosticsInGroup(Group, GroupDiags))
     return true;
     return true;
 
 
@@ -321,7 +321,7 @@ bool DiagnosticsEngine::setDiagnosticGroupErrorAsFatal(StringRef Group,
   // potentially downgrade anything already mapped to be an error.
   // potentially downgrade anything already mapped to be an error.
 
 
   // Get the diagnostics in this group.
   // Get the diagnostics in this group.
-  llvm::SmallVector<diag::kind, 8> GroupDiags;
+  SmallVector<diag::kind, 8> GroupDiags;
   if (Diags->getDiagnosticsInGroup(Group, GroupDiags))
   if (Diags->getDiagnosticsInGroup(Group, GroupDiags))
     return true;
     return true;
 
 
@@ -342,7 +342,7 @@ bool DiagnosticsEngine::setDiagnosticGroupErrorAsFatal(StringRef Group,
 void DiagnosticsEngine::setMappingToAllDiagnostics(diag::Mapping Map,
 void DiagnosticsEngine::setMappingToAllDiagnostics(diag::Mapping Map,
                                                    SourceLocation Loc) {
                                                    SourceLocation Loc) {
   // Get all the diagnostics.
   // Get all the diagnostics.
-  llvm::SmallVector<diag::kind, 64> AllDiags;
+  SmallVector<diag::kind, 64> AllDiags;
   Diags->getAllDiagnostics(AllDiags);
   Diags->getAllDiagnostics(AllDiags);
 
 
   // Set the mapping.
   // Set the mapping.

+ 5 - 7
lib/Basic/DiagnosticIDs.cpp

@@ -546,9 +546,8 @@ StringRef DiagnosticIDs::getWarningOptionForDiag(unsigned DiagID) {
 }
 }
 
 
 void DiagnosticIDs::getDiagnosticsInGroup(
 void DiagnosticIDs::getDiagnosticsInGroup(
-  const WarningOption *Group,
-  llvm::SmallVectorImpl<diag::kind> &Diags) const
-{
+    const WarningOption *Group,
+    SmallVectorImpl<diag::kind> &Diags) const {
   // Add the members of the option diagnostic set.
   // Add the members of the option diagnostic set.
   if (const short *Member = Group->Members) {
   if (const short *Member = Group->Members) {
     for (; *Member != -1; ++Member)
     for (; *Member != -1; ++Member)
@@ -563,9 +562,8 @@ void DiagnosticIDs::getDiagnosticsInGroup(
 }
 }
 
 
 bool DiagnosticIDs::getDiagnosticsInGroup(
 bool DiagnosticIDs::getDiagnosticsInGroup(
-  StringRef Group,
-  llvm::SmallVectorImpl<diag::kind> &Diags) const
-{
+    StringRef Group,
+    SmallVectorImpl<diag::kind> &Diags) const {
   WarningOption Key = { Group.size(), Group.data(), 0, 0 };
   WarningOption Key = { Group.size(), Group.data(), 0, 0 };
   const WarningOption *Found =
   const WarningOption *Found =
   std::lower_bound(OptionTable, OptionTable + OptionTableSize, Key,
   std::lower_bound(OptionTable, OptionTable + OptionTableSize, Key,
@@ -579,7 +577,7 @@ bool DiagnosticIDs::getDiagnosticsInGroup(
 }
 }
 
 
 void DiagnosticIDs::getAllDiagnostics(
 void DiagnosticIDs::getAllDiagnostics(
-                               llvm::SmallVectorImpl<diag::kind> &Diags) const {
+                               SmallVectorImpl<diag::kind> &Diags) const {
   for (unsigned i = 0; i != StaticDiagInfoSize; ++i)
   for (unsigned i = 0; i != StaticDiagInfoSize; ++i)
     Diags.push_back(StaticDiagInfo[i].DiagID);
     Diags.push_back(StaticDiagInfo[i].DiagID);
 }
 }

+ 6 - 6
lib/Basic/Module.cpp

@@ -103,15 +103,15 @@ const Module *Module::getTopLevelModule() const {
 }
 }
 
 
 std::string Module::getFullModuleName() const {
 std::string Module::getFullModuleName() const {
-  llvm::SmallVector<StringRef, 2> Names;
+  SmallVector<StringRef, 2> Names;
   
   
   // Build up the set of module names (from innermost to outermost).
   // Build up the set of module names (from innermost to outermost).
   for (const Module *M = this; M; M = M->Parent)
   for (const Module *M = this; M; M = M->Parent)
     Names.push_back(M->Name);
     Names.push_back(M->Name);
   
   
   std::string Result;
   std::string Result;
-  for (llvm::SmallVector<StringRef, 2>::reverse_iterator I = Names.rbegin(),
-                                                      IEnd = Names.rend(); 
+  for (SmallVector<StringRef, 2>::reverse_iterator I = Names.rbegin(),
+                                                IEnd = Names.rend();
        I != IEnd; ++I) {
        I != IEnd; ++I) {
     if (!Result.empty())
     if (!Result.empty())
       Result += '.';
       Result += '.';
@@ -140,7 +140,7 @@ void Module::addRequirement(StringRef Feature, const LangOptions &LangOpts,
   if (!IsAvailable)
   if (!IsAvailable)
     return;
     return;
 
 
-  llvm::SmallVector<Module *, 2> Stack;
+  SmallVector<Module *, 2> Stack;
   Stack.push_back(this);
   Stack.push_back(this);
   while (!Stack.empty()) {
   while (!Stack.empty()) {
     Module *Current = Stack.back();
     Module *Current = Stack.back();
@@ -167,7 +167,7 @@ Module *Module::findSubmodule(StringRef Name) const {
   return SubModules[Pos->getValue()];
   return SubModules[Pos->getValue()];
 }
 }
 
 
-static void printModuleId(llvm::raw_ostream &OS, const ModuleId &Id) {
+static void printModuleId(raw_ostream &OS, const ModuleId &Id) {
   for (unsigned I = 0, N = Id.size(); I != N; ++I) {
   for (unsigned I = 0, N = Id.size(); I != N; ++I) {
     if (I)
     if (I)
       OS << ".";
       OS << ".";
@@ -175,7 +175,7 @@ static void printModuleId(llvm::raw_ostream &OS, const ModuleId &Id) {
   }
   }
 }
 }
 
 
-void Module::print(llvm::raw_ostream &OS, unsigned Indent) const {
+void Module::print(raw_ostream &OS, unsigned Indent) const {
   OS.indent(Indent);
   OS.indent(Indent);
   if (IsFramework)
   if (IsFramework)
     OS << "framework ";
     OS << "framework ";

+ 2 - 2
lib/Basic/Targets.cpp

@@ -1122,7 +1122,7 @@ namespace {
   class NVPTXTargetInfo : public TargetInfo {
   class NVPTXTargetInfo : public TargetInfo {
     static const char * const GCCRegNames[];
     static const char * const GCCRegNames[];
     static const Builtin::Info BuiltinInfo[];
     static const Builtin::Info BuiltinInfo[];
-    std::vector<llvm::StringRef> AvailableFeatures;
+    std::vector<StringRef> AvailableFeatures;
   public:
   public:
     NVPTXTargetInfo(const std::string& triple) : TargetInfo(triple) {
     NVPTXTargetInfo(const std::string& triple) : TargetInfo(triple) {
       BigEndian = false;
       BigEndian = false;
@@ -4443,7 +4443,7 @@ namespace {
   class SPIRTargetInfo : public TargetInfo {
   class SPIRTargetInfo : public TargetInfo {
     static const char * const GCCRegNames[];
     static const char * const GCCRegNames[];
     static const Builtin::Info BuiltinInfo[];
     static const Builtin::Info BuiltinInfo[];
-    std::vector<llvm::StringRef> AvailableFeatures;
+    std::vector<StringRef> AvailableFeatures;
   public:
   public:
     SPIRTargetInfo(const std::string& triple) : TargetInfo(triple) {
     SPIRTargetInfo(const std::string& triple) : TargetInfo(triple) {
       assert(getTriple().getOS() == llvm::Triple::UnknownOS &&
       assert(getTriple().getOS() == llvm::Triple::UnknownOS &&

+ 2 - 2
lib/CodeGen/CGBlocks.h

@@ -144,7 +144,7 @@ inline BlockFieldFlags operator|(BlockFieldFlag_t l, BlockFieldFlag_t r) {
 class CGBlockInfo {
 class CGBlockInfo {
 public:
 public:
   /// Name - The name of the block, kindof.
   /// Name - The name of the block, kindof.
-  llvm::StringRef Name;
+  StringRef Name;
 
 
   /// The field index of 'this' within the block, if there is one.
   /// The field index of 'this' within the block, if there is one.
   unsigned CXXThisIndex;
   unsigned CXXThisIndex;
@@ -247,7 +247,7 @@ public:
     return BlockExpression;
     return BlockExpression;
   }
   }
 
 
-  CGBlockInfo(const BlockDecl *blockDecl, llvm::StringRef Name);
+  CGBlockInfo(const BlockDecl *blockDecl, StringRef Name);
 };
 };
 
 
 }  // end namespace CodeGen
 }  // end namespace CodeGen

+ 2 - 2
lib/CodeGen/CGBuiltin.cpp

@@ -415,7 +415,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
     if (getLangOpts().SanitizeUnreachable)
     if (getLangOpts().SanitizeUnreachable)
       EmitCheck(Builder.getFalse(), "builtin_unreachable",
       EmitCheck(Builder.getFalse(), "builtin_unreachable",
                 EmitCheckSourceLocation(E->getExprLoc()),
                 EmitCheckSourceLocation(E->getExprLoc()),
-                llvm::ArrayRef<llvm::Value *>(), CRK_Unrecoverable);
+                ArrayRef<llvm::Value *>(), CRK_Unrecoverable);
     else
     else
       Builder.CreateUnreachable();
       Builder.CreateUnreachable();
 
 
@@ -1318,7 +1318,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
     // Get the annotation string, go through casts. Sema requires this to be a
     // Get the annotation string, go through casts. Sema requires this to be a
     // non-wide string literal, potentially casted, so the cast<> is safe.
     // non-wide string literal, potentially casted, so the cast<> is safe.
     const Expr *AnnotationStrExpr = E->getArg(1)->IgnoreParenCasts();
     const Expr *AnnotationStrExpr = E->getArg(1)->IgnoreParenCasts();
-    llvm::StringRef Str = cast<StringLiteral>(AnnotationStrExpr)->getString();
+    StringRef Str = cast<StringLiteral>(AnnotationStrExpr)->getString();
     return RValue::get(EmitAnnotationCall(F, AnnVal, Str, E->getExprLoc()));
     return RValue::get(EmitAnnotationCall(F, AnnVal, Str, E->getExprLoc()));
   }
   }
   case Builtin::BI__noop:
   case Builtin::BI__noop:

+ 1 - 1
lib/CodeGen/CGCUDANV.cpp

@@ -78,7 +78,7 @@ llvm::Constant *CGNVCUDARuntime::getLaunchFn() const {
 void CGNVCUDARuntime::EmitDeviceStubBody(CodeGenFunction &CGF,
 void CGNVCUDARuntime::EmitDeviceStubBody(CodeGenFunction &CGF,
                                          FunctionArgList &Args) {
                                          FunctionArgList &Args) {
   // Build the argument value list and the argument stack struct type.
   // Build the argument value list and the argument stack struct type.
-  llvm::SmallVector<llvm::Value *, 16> ArgValues;
+  SmallVector<llvm::Value *, 16> ArgValues;
   std::vector<llvm::Type *> ArgTypes;
   std::vector<llvm::Type *> ArgTypes;
   for (FunctionArgList::const_iterator I = Args.begin(), E = Args.end();
   for (FunctionArgList::const_iterator I = Args.begin(), E = Args.end();
        I != E; ++I) {
        I != E; ++I) {

+ 0 - 2
lib/CodeGen/CGCall.h

@@ -29,8 +29,6 @@ namespace llvm {
   class Function;
   class Function;
   class Type;
   class Type;
   class Value;
   class Value;
-
-  template<typename T, unsigned> class SmallVector;
 }
 }
 
 
 namespace clang {
 namespace clang {

+ 1 - 1
lib/CodeGen/CGException.cpp

@@ -871,7 +871,7 @@ llvm::BasicBlock *CodeGenFunction::EmitLandingPad() {
     // Create a filter expression: a constant array indicating which filter
     // Create a filter expression: a constant array indicating which filter
     // types there are. The personality routine only lands here if the filter
     // types there are. The personality routine only lands here if the filter
     // doesn't match.
     // doesn't match.
-    llvm::SmallVector<llvm::Constant*, 8> Filters;
+    SmallVector<llvm::Constant*, 8> Filters;
     llvm::ArrayType *AType =
     llvm::ArrayType *AType =
       llvm::ArrayType::get(!filterTypes.empty() ?
       llvm::ArrayType::get(!filterTypes.empty() ?
                              filterTypes[0]->getType() : Int8PtrTy,
                              filterTypes[0]->getType() : Int8PtrTy,

+ 9 - 9
lib/CodeGen/CGExpr.cpp

@@ -553,7 +553,7 @@ void CodeGenFunction::EmitTypeCheck(TypeCheckKind TCK, SourceLocation Loc,
     // FIXME: This is not guaranteed to be deterministic! Move to a
     // FIXME: This is not guaranteed to be deterministic! Move to a
     //        fingerprinting mechanism once LLVM provides one. For the time
     //        fingerprinting mechanism once LLVM provides one. For the time
     //        being the implementation happens to be deterministic.
     //        being the implementation happens to be deterministic.
-    llvm::SmallString<64> MangledName;
+    SmallString<64> MangledName;
     llvm::raw_svector_ostream Out(MangledName);
     llvm::raw_svector_ostream Out(MangledName);
     CGM.getCXXABI().getMangleContext().mangleCXXRTTI(Ty.getUnqualifiedType(),
     CGM.getCXXABI().getMangleContext().mangleCXXRTTI(Ty.getUnqualifiedType(),
                                                      Out);
                                                      Out);
@@ -1095,7 +1095,7 @@ void CodeGenFunction::EmitStoreOfScalar(llvm::Value *Value, llvm::Value *Addr,
       llvm::LLVMContext &VMContext = getLLVMContext();
       llvm::LLVMContext &VMContext = getLLVMContext();
       
       
       // Our source is a vec3, do a shuffle vector to make it a vec4.
       // Our source is a vec3, do a shuffle vector to make it a vec4.
-      llvm::SmallVector<llvm::Constant*, 4> Mask;
+      SmallVector<llvm::Constant*, 4> Mask;
       Mask.push_back(llvm::ConstantInt::get(
       Mask.push_back(llvm::ConstantInt::get(
                                             llvm::Type::getInt32Ty(VMContext),
                                             llvm::Type::getInt32Ty(VMContext),
                                             0));
                                             0));
@@ -1908,7 +1908,7 @@ llvm::Constant *CodeGenFunction::EmitCheckTypeDescriptor(QualType T) {
 
 
   // Format the type name as if for a diagnostic, including quotes and
   // Format the type name as if for a diagnostic, including quotes and
   // optionally an 'aka'.
   // optionally an 'aka'.
-  llvm::SmallString<32> Buffer;
+  SmallString<32> Buffer;
   CGM.getDiags().ConvertArgToString(DiagnosticsEngine::ak_qualtype,
   CGM.getDiags().ConvertArgToString(DiagnosticsEngine::ak_qualtype,
                                     (intptr_t)T.getAsOpaquePtr(),
                                     (intptr_t)T.getAsOpaquePtr(),
                                     0, 0, 0, 0, 0, 0, Buffer,
                                     0, 0, 0, 0, 0, 0, Buffer,
@@ -1971,8 +1971,8 @@ llvm::Constant *CodeGenFunction::EmitCheckSourceLocation(SourceLocation Loc) {
 }
 }
 
 
 void CodeGenFunction::EmitCheck(llvm::Value *Checked, StringRef CheckName,
 void CodeGenFunction::EmitCheck(llvm::Value *Checked, StringRef CheckName,
-                                llvm::ArrayRef<llvm::Constant *> StaticArgs,
-                                llvm::ArrayRef<llvm::Value *> DynamicArgs,
+                                ArrayRef<llvm::Constant *> StaticArgs,
+                                ArrayRef<llvm::Value *> DynamicArgs,
                                 CheckRecoverableKind RecoverKind) {
                                 CheckRecoverableKind RecoverKind) {
   llvm::BasicBlock *Cont = createBasicBlock("cont");
   llvm::BasicBlock *Cont = createBasicBlock("cont");
 
 
@@ -1994,8 +1994,8 @@ void CodeGenFunction::EmitCheck(llvm::Value *Checked, StringRef CheckName,
                                llvm::GlobalVariable::PrivateLinkage, Info);
                                llvm::GlobalVariable::PrivateLinkage, Info);
   InfoPtr->setUnnamedAddr(true);
   InfoPtr->setUnnamedAddr(true);
 
 
-  llvm::SmallVector<llvm::Value *, 4> Args;
-  llvm::SmallVector<llvm::Type *, 4> ArgTypes;
+  SmallVector<llvm::Value *, 4> Args;
+  SmallVector<llvm::Type *, 4> ArgTypes;
   Args.reserve(DynamicArgs.size() + 1);
   Args.reserve(DynamicArgs.size() + 1);
   ArgTypes.reserve(DynamicArgs.size() + 1);
   ArgTypes.reserve(DynamicArgs.size() + 1);
 
 
@@ -3260,7 +3260,7 @@ RValue CodeGenFunction::EmitAtomicExpr(AtomicExpr *E, llvm::Value *Dest) {
   // Use a library call.  See: http://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary .
   // Use a library call.  See: http://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary .
   if (UseLibcall) {
   if (UseLibcall) {
 
 
-    llvm::SmallVector<QualType, 5> Params;
+    SmallVector<QualType, 5> Params;
     CallArgList Args;
     CallArgList Args;
     // Size is always the first parameter
     // Size is always the first parameter
     Args.add(RValue::get(llvm::ConstantInt::get(SizeTy, Size)),
     Args.add(RValue::get(llvm::ConstantInt::get(SizeTy, Size)),
@@ -3485,7 +3485,7 @@ static LValueOrRValue emitPseudoObjectExpr(CodeGenFunction &CGF,
                                            const PseudoObjectExpr *E,
                                            const PseudoObjectExpr *E,
                                            bool forLValue,
                                            bool forLValue,
                                            AggValueSlot slot) {
                                            AggValueSlot slot) {
-  llvm::SmallVector<CodeGenFunction::OpaqueValueMappingData, 4> opaques;
+  SmallVector<CodeGenFunction::OpaqueValueMappingData, 4> opaques;
 
 
   // Find the result expression, if any.
   // Find the result expression, if any.
   const Expr *resultExpr = E->getResultExpr();
   const Expr *resultExpr = E->getResultExpr();

+ 1 - 1
lib/CodeGen/CGExprConstant.cpp

@@ -455,7 +455,7 @@ void ConstStructBuilder::Build(const APValue &Val, const RecordDecl *RD,
 
 
     // Accumulate and sort bases, in order to visit them in address order, which
     // Accumulate and sort bases, in order to visit them in address order, which
     // may not be the same as declaration order.
     // may not be the same as declaration order.
-    llvm::SmallVector<BaseInfo, 8> Bases;
+    SmallVector<BaseInfo, 8> Bases;
     Bases.reserve(CD->getNumBases());
     Bases.reserve(CD->getNumBases());
     unsigned BaseNo = 0;
     unsigned BaseNo = 0;
     for (CXXRecordDecl::base_class_const_iterator Base = CD->bases_begin(),
     for (CXXRecordDecl::base_class_const_iterator Base = CD->bases_begin(),

+ 2 - 2
lib/CodeGen/CGExprScalar.cpp

@@ -802,8 +802,8 @@ Value *ScalarExprEmitter::EmitNullValue(QualType Ty) {
 /// operation). The check passes if \p Check, which is an \c i1, is \c true.
 /// operation). The check passes if \p Check, which is an \c i1, is \c true.
 void ScalarExprEmitter::EmitBinOpCheck(Value *Check, const BinOpInfo &Info) {
 void ScalarExprEmitter::EmitBinOpCheck(Value *Check, const BinOpInfo &Info) {
   StringRef CheckName;
   StringRef CheckName;
-  llvm::SmallVector<llvm::Constant *, 4> StaticData;
-  llvm::SmallVector<llvm::Value *, 2> DynamicData;
+  SmallVector<llvm::Constant *, 4> StaticData;
+  SmallVector<llvm::Value *, 2> DynamicData;
 
 
   BinaryOperatorKind Opcode = Info.Opcode;
   BinaryOperatorKind Opcode = Info.Opcode;
   if (BinaryOperator::isCompoundAssignmentOp(Opcode))
   if (BinaryOperator::isCompoundAssignmentOp(Opcode))

+ 1 - 1
lib/CodeGen/CGObjC.cpp

@@ -2445,7 +2445,7 @@ static bool shouldEmitSeparateBlockRetain(const Expr *e) {
 /// This massively duplicates emitPseudoObjectRValue.
 /// This massively duplicates emitPseudoObjectRValue.
 static TryEmitResult tryEmitARCRetainPseudoObject(CodeGenFunction &CGF,
 static TryEmitResult tryEmitARCRetainPseudoObject(CodeGenFunction &CGF,
                                                   const PseudoObjectExpr *E) {
                                                   const PseudoObjectExpr *E) {
-  llvm::SmallVector<CodeGenFunction::OpaqueValueMappingData, 4> opaques;
+  SmallVector<CodeGenFunction::OpaqueValueMappingData, 4> opaques;
 
 
   // Find the result expression.
   // Find the result expression.
   const Expr *resultExpr = E->getResultExpr();
   const Expr *resultExpr = E->getResultExpr();

+ 4 - 4
lib/CodeGen/CGObjCGNU.cpp

@@ -192,7 +192,7 @@ protected:
   /// The element types must match the types of the structure elements in the
   /// The element types must match the types of the structure elements in the
   /// first argument.
   /// first argument.
   llvm::GlobalVariable *MakeGlobal(llvm::StructType *Ty,
   llvm::GlobalVariable *MakeGlobal(llvm::StructType *Ty,
-                                   llvm::ArrayRef<llvm::Constant*> V,
+                                   ArrayRef<llvm::Constant *> V,
                                    StringRef Name="",
                                    StringRef Name="",
                                    llvm::GlobalValue::LinkageTypes linkage
                                    llvm::GlobalValue::LinkageTypes linkage
                                          =llvm::GlobalValue::InternalLinkage) {
                                          =llvm::GlobalValue::InternalLinkage) {
@@ -204,7 +204,7 @@ protected:
   /// elements that the array type declares, of the type specified as the array
   /// elements that the array type declares, of the type specified as the array
   /// element type.
   /// element type.
   llvm::GlobalVariable *MakeGlobal(llvm::ArrayType *Ty,
   llvm::GlobalVariable *MakeGlobal(llvm::ArrayType *Ty,
-                                   llvm::ArrayRef<llvm::Constant*> V,
+                                   ArrayRef<llvm::Constant *> V,
                                    StringRef Name="",
                                    StringRef Name="",
                                    llvm::GlobalValue::LinkageTypes linkage
                                    llvm::GlobalValue::LinkageTypes linkage
                                          =llvm::GlobalValue::InternalLinkage) {
                                          =llvm::GlobalValue::InternalLinkage) {
@@ -215,7 +215,7 @@ protected:
   /// Generates a global array, inferring the array type from the specified
   /// Generates a global array, inferring the array type from the specified
   /// element type and the size of the initialiser.  
   /// element type and the size of the initialiser.  
   llvm::GlobalVariable *MakeGlobalArray(llvm::Type *Ty,
   llvm::GlobalVariable *MakeGlobalArray(llvm::Type *Ty,
-                                        llvm::ArrayRef<llvm::Constant*> V,
+                                        ArrayRef<llvm::Constant *> V,
                                         StringRef Name="",
                                         StringRef Name="",
                                         llvm::GlobalValue::LinkageTypes linkage
                                         llvm::GlobalValue::LinkageTypes linkage
                                          =llvm::GlobalValue::InternalLinkage) {
                                          =llvm::GlobalValue::InternalLinkage) {
@@ -1955,7 +1955,7 @@ llvm::Constant *CGObjCGNU::MakeBitField(ArrayRef<bool> bits) {
     }
     }
     return llvm::ConstantInt::get(IntPtrTy, val);
     return llvm::ConstantInt::get(IntPtrTy, val);
   }
   }
-  llvm::SmallVector<llvm::Constant*, 8> values;
+  SmallVector<llvm::Constant *, 8> values;
   int v=0;
   int v=0;
   while (v < bitCount) {
   while (v < bitCount) {
     int32_t word = 0;
     int32_t word = 0;

+ 11 - 11
lib/CodeGen/CGObjCMac.cpp

@@ -879,16 +879,16 @@ protected:
   llvm::DenseSet<IdentifierInfo*> DefinedProtocols;
   llvm::DenseSet<IdentifierInfo*> DefinedProtocols;
 
 
   /// DefinedClasses - List of defined classes.
   /// DefinedClasses - List of defined classes.
-  llvm::SmallVector<llvm::GlobalValue*, 16> DefinedClasses;
+  SmallVector<llvm::GlobalValue*, 16> DefinedClasses;
 
 
   /// DefinedNonLazyClasses - List of defined "non-lazy" classes.
   /// DefinedNonLazyClasses - List of defined "non-lazy" classes.
-  llvm::SmallVector<llvm::GlobalValue*, 16> DefinedNonLazyClasses;
+  SmallVector<llvm::GlobalValue*, 16> DefinedNonLazyClasses;
 
 
   /// DefinedCategories - List of defined categories.
   /// DefinedCategories - List of defined categories.
-  llvm::SmallVector<llvm::GlobalValue*, 16> DefinedCategories;
+  SmallVector<llvm::GlobalValue*, 16> DefinedCategories;
 
 
   /// DefinedNonLazyCategories - List of defined "non-lazy" categories.
   /// DefinedNonLazyCategories - List of defined "non-lazy" categories.
-  llvm::SmallVector<llvm::GlobalValue*, 16> DefinedNonLazyCategories;
+  SmallVector<llvm::GlobalValue*, 16> DefinedNonLazyCategories;
 
 
   /// GetNameForMethod - Return a name for the given method.
   /// GetNameForMethod - Return a name for the given method.
   /// \param[out] NameOut - The return value.
   /// \param[out] NameOut - The return value.
@@ -984,7 +984,7 @@ protected:
   /// PushProtocolProperties - Push protocol's property on the input stack.
   /// PushProtocolProperties - Push protocol's property on the input stack.
   void PushProtocolProperties(
   void PushProtocolProperties(
     llvm::SmallPtrSet<const IdentifierInfo*, 16> &PropertySet,
     llvm::SmallPtrSet<const IdentifierInfo*, 16> &PropertySet,
-    llvm::SmallVectorImpl<llvm::Constant*> &Properties,
+    SmallVectorImpl<llvm::Constant*> &Properties,
     const Decl *Container,
     const Decl *Container,
     const ObjCProtocolDecl *PROTO,
     const ObjCProtocolDecl *PROTO,
     const ObjCCommonTypesHelper &ObjCTypes);
     const ObjCCommonTypesHelper &ObjCTypes);
@@ -2691,7 +2691,7 @@ llvm::Constant *
 CGObjCMac::EmitProtocolList(Twine Name,
 CGObjCMac::EmitProtocolList(Twine Name,
                             ObjCProtocolDecl::protocol_iterator begin,
                             ObjCProtocolDecl::protocol_iterator begin,
                             ObjCProtocolDecl::protocol_iterator end) {
                             ObjCProtocolDecl::protocol_iterator end) {
-  llvm::SmallVector<llvm::Constant*, 16> ProtocolRefs;
+  SmallVector<llvm::Constant *, 16> ProtocolRefs;
 
 
   for (; begin != end; ++begin)
   for (; begin != end; ++begin)
     ProtocolRefs.push_back(GetProtocolRef(*begin));
     ProtocolRefs.push_back(GetProtocolRef(*begin));
@@ -2722,7 +2722,7 @@ CGObjCMac::EmitProtocolList(Twine Name,
 
 
 void CGObjCCommonMac::
 void CGObjCCommonMac::
 PushProtocolProperties(llvm::SmallPtrSet<const IdentifierInfo*,16> &PropertySet,
 PushProtocolProperties(llvm::SmallPtrSet<const IdentifierInfo*,16> &PropertySet,
-                       llvm::SmallVectorImpl<llvm::Constant*> &Properties,
+                       SmallVectorImpl<llvm::Constant *> &Properties,
                        const Decl *Container,
                        const Decl *Container,
                        const ObjCProtocolDecl *PROTO,
                        const ObjCProtocolDecl *PROTO,
                        const ObjCCommonTypesHelper &ObjCTypes) {
                        const ObjCCommonTypesHelper &ObjCTypes) {
@@ -2758,7 +2758,7 @@ llvm::Constant *CGObjCCommonMac::EmitPropertyList(Twine Name,
                                        const Decl *Container,
                                        const Decl *Container,
                                        const ObjCContainerDecl *OCD,
                                        const ObjCContainerDecl *OCD,
                                        const ObjCCommonTypesHelper &ObjCTypes) {
                                        const ObjCCommonTypesHelper &ObjCTypes) {
-  llvm::SmallVector<llvm::Constant*, 16> Properties;
+  SmallVector<llvm::Constant *, 16> Properties;
   llvm::SmallPtrSet<const IdentifierInfo*, 16> PropertySet;
   llvm::SmallPtrSet<const IdentifierInfo*, 16> PropertySet;
   for (ObjCContainerDecl::prop_iterator I = OCD->prop_begin(),
   for (ObjCContainerDecl::prop_iterator I = OCD->prop_begin(),
          E = OCD->prop_end(); I != E; ++I) {
          E = OCD->prop_end(); I != E; ++I) {
@@ -2893,7 +2893,7 @@ void CGObjCMac::GenerateCategory(const ObjCCategoryImplDecl *OCD) {
   llvm::raw_svector_ostream(ExtName) << Interface->getName() << '_'
   llvm::raw_svector_ostream(ExtName) << Interface->getName() << '_'
                                      << OCD->getName();
                                      << OCD->getName();
 
 
-  llvm::SmallVector<llvm::Constant*, 16> InstanceMethods, ClassMethods;
+  SmallVector<llvm::Constant *, 16> InstanceMethods, ClassMethods;
   for (ObjCCategoryImplDecl::instmeth_iterator
   for (ObjCCategoryImplDecl::instmeth_iterator
          i = OCD->instmeth_begin(), e = OCD->instmeth_end(); i != e; ++i) {
          i = OCD->instmeth_begin(), e = OCD->instmeth_end(); i != e; ++i) {
     // Instance methods should always be defined.
     // Instance methods should always be defined.
@@ -3021,7 +3021,7 @@ void CGObjCMac::GenerateClass(const ObjCImplementationDecl *ID) {
   if (ID->getClassInterface()->getVisibility() == HiddenVisibility)
   if (ID->getClassInterface()->getVisibility() == HiddenVisibility)
     Flags |= FragileABI_Class_Hidden;
     Flags |= FragileABI_Class_Hidden;
 
 
-  llvm::SmallVector<llvm::Constant*, 16> InstanceMethods, ClassMethods;
+  SmallVector<llvm::Constant *, 16> InstanceMethods, ClassMethods;
   for (ObjCImplementationDecl::instmeth_iterator
   for (ObjCImplementationDecl::instmeth_iterator
          i = ID->instmeth_begin(), e = ID->instmeth_end(); i != e; ++i) {
          i = ID->instmeth_begin(), e = ID->instmeth_end(); i != e; ++i) {
     // Instance methods should always be defined.
     // Instance methods should always be defined.
@@ -6340,7 +6340,7 @@ llvm::Constant *
 CGObjCNonFragileABIMac::EmitProtocolList(Twine Name,
 CGObjCNonFragileABIMac::EmitProtocolList(Twine Name,
                                       ObjCProtocolDecl::protocol_iterator begin,
                                       ObjCProtocolDecl::protocol_iterator begin,
                                       ObjCProtocolDecl::protocol_iterator end) {
                                       ObjCProtocolDecl::protocol_iterator end) {
-  llvm::SmallVector<llvm::Constant*, 16> ProtocolRefs;
+  SmallVector<llvm::Constant *, 16> ProtocolRefs;
 
 
   // Just return null for empty protocol lists
   // Just return null for empty protocol lists
   if (begin == end)
   if (begin == end)

+ 1 - 1
lib/CodeGen/CodeGenAction.cpp

@@ -398,7 +398,7 @@ void CodeGenAction::ExecuteAction() {
         Msg = Msg.substr(7);
         Msg = Msg.substr(7);
 
 
       // Escape '%', which is interpreted as a format character.
       // Escape '%', which is interpreted as a format character.
-      llvm::SmallString<128> EscapedMessage;
+      SmallString<128> EscapedMessage;
       for (unsigned i = 0, e = Msg.size(); i != e; ++i) {
       for (unsigned i = 0, e = Msg.size(); i != e; ++i) {
         if (Msg[i] == '%')
         if (Msg[i] == '%')
           EscapedMessage += '%';
           EscapedMessage += '%';

+ 4 - 4
lib/CodeGen/CodeGenFunction.cpp

@@ -270,7 +270,7 @@ void CodeGenFunction::EmitMCountInstrumentation() {
 // FIXME: Add type, address, and access qualifiers.
 // FIXME: Add type, address, and access qualifiers.
 static void GenOpenCLArgMetadata(const FunctionDecl *FD, llvm::Function *Fn,
 static void GenOpenCLArgMetadata(const FunctionDecl *FD, llvm::Function *Fn,
                                  CodeGenModule &CGM,llvm::LLVMContext &Context,
                                  CodeGenModule &CGM,llvm::LLVMContext &Context,
-                                 llvm::SmallVector <llvm::Value*, 5> &kernelMDArgs) {
+                                 SmallVector <llvm::Value*, 5> &kernelMDArgs) {
 
 
   // Create MDNodes that represents the kernel arg metadata.
   // Create MDNodes that represents the kernel arg metadata.
   // Each MDNode is a list in the form of "key", N number of values which is
   // Each MDNode is a list in the form of "key", N number of values which is
@@ -299,7 +299,7 @@ void CodeGenFunction::EmitOpenCLKernelMetadata(const FunctionDecl *FD,
 
 
   llvm::LLVMContext &Context = getLLVMContext();
   llvm::LLVMContext &Context = getLLVMContext();
 
 
-  llvm::SmallVector <llvm::Value*, 5> kernelMDArgs;
+  SmallVector <llvm::Value*, 5> kernelMDArgs;
   kernelMDArgs.push_back(Fn);
   kernelMDArgs.push_back(Fn);
 
 
   if (CGM.getCodeGenOpts().EmitOpenCLArgMetadata)
   if (CGM.getCodeGenOpts().EmitOpenCLArgMetadata)
@@ -561,7 +561,7 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn,
     if (getLangOpts().SanitizeReturn)
     if (getLangOpts().SanitizeReturn)
       EmitCheck(Builder.getFalse(), "missing_return",
       EmitCheck(Builder.getFalse(), "missing_return",
                 EmitCheckSourceLocation(FD->getLocation()),
                 EmitCheckSourceLocation(FD->getLocation()),
-                llvm::ArrayRef<llvm::Value*>(), CRK_Unrecoverable);
+                ArrayRef<llvm::Value *>(), CRK_Unrecoverable);
     else if (CGM.getCodeGenOpts().OptimizationLevel == 0)
     else if (CGM.getCodeGenOpts().OptimizationLevel == 0)
       Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::trap));
       Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::trap));
     Builder.CreateUnreachable();
     Builder.CreateUnreachable();
@@ -1239,7 +1239,7 @@ void CodeGenFunction::unprotectFromPeepholes(PeepholeProtection protection) {
 
 
 llvm::Value *CodeGenFunction::EmitAnnotationCall(llvm::Value *AnnotationFn,
 llvm::Value *CodeGenFunction::EmitAnnotationCall(llvm::Value *AnnotationFn,
                                                  llvm::Value *AnnotatedVal,
                                                  llvm::Value *AnnotatedVal,
-                                                 llvm::StringRef AnnotationStr,
+                                                 StringRef AnnotationStr,
                                                  SourceLocation Location) {
                                                  SourceLocation Location) {
   llvm::Value *Args[4] = {
   llvm::Value *Args[4] = {
     AnnotatedVal,
     AnnotatedVal,

+ 3 - 3
lib/CodeGen/CodeGenFunction.h

@@ -2518,7 +2518,7 @@ public:
   /// Emit an annotation call (intrinsic or builtin).
   /// Emit an annotation call (intrinsic or builtin).
   llvm::Value *EmitAnnotationCall(llvm::Value *AnnotationFn,
   llvm::Value *EmitAnnotationCall(llvm::Value *AnnotationFn,
                                   llvm::Value *AnnotatedVal,
                                   llvm::Value *AnnotatedVal,
-                                  llvm::StringRef AnnotationStr,
+                                  StringRef AnnotationStr,
                                   SourceLocation Location);
                                   SourceLocation Location);
 
 
   /// Emit local annotations for the local variable V, declared by D.
   /// Emit local annotations for the local variable V, declared by D.
@@ -2584,8 +2584,8 @@ public:
   /// sanitizer runtime with the provided arguments, and create a conditional
   /// sanitizer runtime with the provided arguments, and create a conditional
   /// branch to it.
   /// branch to it.
   void EmitCheck(llvm::Value *Checked, StringRef CheckName,
   void EmitCheck(llvm::Value *Checked, StringRef CheckName,
-                 llvm::ArrayRef<llvm::Constant *> StaticArgs,
-                 llvm::ArrayRef<llvm::Value *> DynamicArgs,
+                 ArrayRef<llvm::Constant *> StaticArgs,
+                 ArrayRef<llvm::Value *> DynamicArgs,
                  CheckRecoverableKind Recoverable);
                  CheckRecoverableKind Recoverable);
 
 
   /// \brief Create a basic block that will call the trap intrinsic, and emit a
   /// \brief Create a basic block that will call the trap intrinsic, and emit a

+ 2 - 2
lib/CodeGen/CodeGenModule.cpp

@@ -768,7 +768,7 @@ void CodeGenModule::EmitGlobalAnnotations() {
   gv->setSection(AnnotationSection);
   gv->setSection(AnnotationSection);
 }
 }
 
 
-llvm::Constant *CodeGenModule::EmitAnnotationString(llvm::StringRef Str) {
+llvm::Constant *CodeGenModule::EmitAnnotationString(StringRef Str) {
   llvm::StringMap<llvm::Constant*>::iterator i = AnnotationStrings.find(Str);
   llvm::StringMap<llvm::Constant*>::iterator i = AnnotationStrings.find(Str);
   if (i != AnnotationStrings.end())
   if (i != AnnotationStrings.end())
     return i->second;
     return i->second;
@@ -1820,7 +1820,7 @@ static void replaceUsesOfNonProtoConstant(llvm::Constant *old,
       continue;
       continue;
 
 
     // Get the call site's attribute list.
     // Get the call site's attribute list.
-    llvm::SmallVector<llvm::AttributeWithIndex, 8> newAttrs;
+    SmallVector<llvm::AttributeWithIndex, 8> newAttrs;
     llvm::AttributeSet oldAttrs = callSite.getAttributes();
     llvm::AttributeSet oldAttrs = callSite.getAttributes();
 
 
     // Collect any return attributes from the call.
     // Collect any return attributes from the call.

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov