teak-llvm/clang/test/CodeGenObjCXX/debug-info.mm
Douglas Katzman 3459ce2e5e Stop messing with the 'g' group of options in CompilerInvocation.
With this change, most 'g' options are rejected by CompilerInvocation.
They remain only as Driver options. The new way to request debug info
from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}"
and "-dwarf-version={2|3|4}". In the absence of a command-line option
to specify Dwarf version, the Toolchain decides it, rather than placing
Toolchain-specific logic in CompilerInvocation.

Also fix a bug in the Windows compatibility argument parsing
in which the "rightmost argument wins" principle failed.

Differential Revision: http://reviews.llvm.org/D13221

llvm-svn: 249655
2015-10-08 04:24:12 +00:00

42 lines
982 B
Plaintext

// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -debug-info-kind=limited -emit-llvm %s -o /dev/null
// This test passes if clang doesn't crash.
template <class C> class scoped_ptr {
public:
C* operator->() const { return 0; }
};
@class NSWindow;
@class NSImage;
@interface NSWindow {
NSImage *_miniIcon;
}
-(id)windowController;
@end
class AutomationResourceTracker {
public:
NSWindow* GetResource(int handle) { return 0; }
};
# 13 "automation/automation_window_tracker.h"
class AutomationWindowTracker : public AutomationResourceTracker { };
template<typename NST> class scoped_nsobject { };
@interface TabStripController{
scoped_nsobject<NSImage> defaultFavicon_;
}
@end
@interface BrowserWindowController {
TabStripController* tabStripController_;
}
@end
void WindowGetViewBounds(scoped_ptr<AutomationWindowTracker> window_tracker_) {
NSWindow* window = window_tracker_->GetResource(42);
BrowserWindowController* controller = [window windowController];
}