From 809500fc2c13c8173a16b052304d983864e4a1e1 Mon Sep 17 00:00:00 2001
From: Dimitry Andric <dim@FreeBSD.org>
Date: Mon, 8 Apr 2013 18:45:10 +0000
Subject: Vendor import of clang trunk r178860:
 http://llvm.org/svn/llvm-project/cfe/trunk@178860

---
 tools/libclang/CIndexer.h | 33 +++++++++++++++++++++++++++++----
 1 file changed, 29 insertions(+), 4 deletions(-)

(limited to 'tools/libclang/CIndexer.h')

diff --git a/tools/libclang/CIndexer.h b/tools/libclang/CIndexer.h
index 1e5fb824bb1b..08162c563e95 100644
--- a/tools/libclang/CIndexer.h
+++ b/tools/libclang/CIndexer.h
@@ -26,6 +26,11 @@ namespace llvm {
 
 namespace clang {
   class ASTUnit;
+  class MacroInfo;
+  class MacroDefinition;
+  class SourceLocation;
+  class Token;
+  class IdentifierInfo;
 
 class CIndexer {
   bool OnlyLocalDecls;
@@ -33,7 +38,6 @@ class CIndexer {
   unsigned Options; // CXGlobalOptFlags.
 
   llvm::sys::Path ResourcesPath;
-  std::string WorkingDir;
 
 public:
  CIndexer() : OnlyLocalDecls(false), DisplayDiagnostics(false),
@@ -59,9 +63,6 @@ public:
 
   /// \brief Get the path of the clang resource files.
   std::string getClangResourcesPath();
-
-  const std::string &getWorkingDirectory() const { return WorkingDir; }
-  void setWorkingDirectory(const std::string &Dir) { WorkingDir = Dir; }
 };
 
   /**
@@ -98,6 +99,30 @@ public:
 
   namespace cxindex {
     void printDiagsToStderr(ASTUnit *Unit);
+
+    /// \brief If \c MacroDefLoc points at a macro definition with \c II as
+    /// its name, this retrieves its MacroInfo.
+    MacroInfo *getMacroInfo(const IdentifierInfo &II,
+                            SourceLocation MacroDefLoc,
+                            CXTranslationUnit TU);
+
+    /// \brief Retrieves the corresponding MacroInfo of a MacroDefinition.
+    const MacroInfo *getMacroInfo(const MacroDefinition *MacroDef,
+                                  CXTranslationUnit TU);
+
+    /// \brief If \c Loc resides inside the definition of \c MI and it points at
+    /// an identifier that has ever been a macro name, this returns the latest
+    /// MacroDefinition for that name, otherwise it returns NULL.
+    MacroDefinition *checkForMacroInMacroDefinition(const MacroInfo *MI,
+                                                    SourceLocation Loc,
+                                                    CXTranslationUnit TU);
+
+    /// \brief If \c Tok resides inside the definition of \c MI and it points at
+    /// an identifier that has ever been a macro name, this returns the latest
+    /// MacroDefinition for that name, otherwise it returns NULL.
+    MacroDefinition *checkForMacroInMacroDefinition(const MacroInfo *MI,
+                                                    const Token &Tok,
+                                                    CXTranslationUnit TU);
   }
 }
 
-- 
cgit v1.2.3