aboutsummaryrefslogtreecommitdiff
path: root/tools/CIndex/CXCursor.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-01-15 20:35:54 +0000
committerTed Kremenek <kremenek@apple.com>2010-01-15 20:35:54 +0000
commit16c440a377b7ec8b722a2e2c7c864f75c95bd305 (patch)
tree3cb6cea5ac7a8f604ca1e72f9c8534aef24f76fd /tools/CIndex/CXCursor.cpp
parent8a850baa41ea9015b949183667ad96a981f10b09 (diff)
Add CXCursor.[h,cpp]. These files will centralize the logic for creating/probing CXCursors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/CIndex/CXCursor.cpp')
-rw-r--r--tools/CIndex/CXCursor.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/CIndex/CXCursor.cpp b/tools/CIndex/CXCursor.cpp
new file mode 100644
index 0000000000..a7a7dfca65
--- /dev/null
+++ b/tools/CIndex/CXCursor.cpp
@@ -0,0 +1,29 @@
+//===- CXCursor.cpp - Routines for manipulating CXCursors -----------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines routines for manipulating CXCursors.
+//
+//===----------------------------------------------------------------------===//
+
+#include "CXCursor.h"
+#include "clang/AST/Decl.h"
+
+using namespace clang;
+
+CXCursor cxcursor::MakeCXCursor(CXCursorKind K, Decl *D) {
+ CXCursor C = { K, D, 0, 0 };
+ return C;
+}
+
+CXCursor cxcursor::MakeCXCursor(CXCursorKind K, Decl *D, Stmt *S) {
+ assert(clang_isReference(K));
+ CXCursor C = { K, D, S, 0 };
+ return C;
+}
+