summaryrefslogtreecommitdiffstats
path: root/clang/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
commit87553c42c09b6f494ed909fae3bd8de9ff65bdf8 (patch)
treecd18dc756390f87c1e1e97f3ec9db948175d3e8c /clang/tools/CIndex/CXCursor.cpp
parentcab014721bcd634cec89761255ca2e9c821f6a15 (diff)
downloadbcm5719-llvm-87553c42c09b6f494ed909fae3bd8de9ff65bdf8.tar.gz
bcm5719-llvm-87553c42c09b6f494ed909fae3bd8de9ff65bdf8.zip
Add CXCursor.[h,cpp]. These files will centralize the logic for creating/probing CXCursors.
llvm-svn: 93547
Diffstat (limited to 'clang/tools/CIndex/CXCursor.cpp')
-rw-r--r--clang/tools/CIndex/CXCursor.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/clang/tools/CIndex/CXCursor.cpp b/clang/tools/CIndex/CXCursor.cpp
new file mode 100644
index 00000000000..a7a7dfca65e
--- /dev/null
+++ b/clang/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;
+}
+
OpenPOWER on IntegriCloud