[cfe-commits] r96245 - in /cfe/trunk: lib/CodeGen/CGObjC.cpp test/CodeGen/2010-02-15-Dbg-MethodStart.m
Devang Patel
dpatel at apple.com
Mon Feb 15 10:08:38 PST 2010
Author: dpatel
Date: Mon Feb 15 12:08:38 2010
New Revision: 96245
URL: http://llvm.org/viewvc/llvm-project?rev=96245&view=rev
Log:
Use getLocStart(), instead of getLocEnd(), to record starting location of objc method. :)
Added:
cfe/trunk/test/CodeGen/2010-02-15-Dbg-MethodStart.m
Modified:
cfe/trunk/lib/CodeGen/CGObjC.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=96245&r1=96244&r2=96245&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjC.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjC.cpp Mon Feb 15 12:08:38 2010
@@ -122,7 +122,7 @@
E = OMD->param_end(); PI != E; ++PI)
Args.push_back(std::make_pair(*PI, (*PI)->getType()));
- StartFunction(OMD, OMD->getResultType(), Fn, Args, OMD->getLocEnd());
+ StartFunction(OMD, OMD->getResultType(), Fn, Args, OMD->getLocStart());
}
/// Generate an Objective-C method. An Objective-C method is a C function with
Added: cfe/trunk/test/CodeGen/2010-02-15-Dbg-MethodStart.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/2010-02-15-Dbg-MethodStart.m?rev=96245&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/2010-02-15-Dbg-MethodStart.m (added)
+++ cfe/trunk/test/CodeGen/2010-02-15-Dbg-MethodStart.m Mon Feb 15 12:08:38 2010
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -x objective-c -emit-llvm -g < %s | grep subprogram | grep "i32 9"
+// Test to check that subprogram start location.
+
+ at interface Foo
+-(int) barMethod;
+ at end
+
+ at implementation Foo
+-(int) barMethod {
+ int i = 0;
+ int j = 1;
+ int k = 1;
+ return i + j + k;
+}
+ at end
More information about the cfe-commits
mailing list