forked from OSchip/llvm-project
Handle variadic Objective-C methods from DWARF correctly.
<rdar://problem/22039804> llvm-svn: 273632
This commit is contained in:
parent
f0b46ee0aa
commit
5b42f4b8f4
|
@ -1038,7 +1038,8 @@ public:
|
|||
const char *name, // the full symbol name as seen in the symbol table (lldb::opaque_compiler_type_t type, "-[NString stringWithCString:]")
|
||||
const CompilerType &method_compiler_type,
|
||||
lldb::AccessType access,
|
||||
bool is_artificial);
|
||||
bool is_artificial,
|
||||
bool is_variadic);
|
||||
|
||||
static bool
|
||||
SetHasExternalStorage (lldb::opaque_compiler_type_t type, bool has_extern);
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
from lldbsuite.test import lldbinline
|
||||
from lldbsuite.test import decorators
|
||||
|
||||
lldbinline.MakeInlineTest(__file__, globals(), [decorators.skipIfFreeBSD,decorators.skipIfLinux,decorators.skipIfWindows])
|
|
@ -0,0 +1,31 @@
|
|||
//===-- main.m -------------------------------------------*- Objective-C-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface VarClass : NSObject
|
||||
- (id) lottaArgs: (id) first, ...;
|
||||
@end
|
||||
|
||||
@implementation VarClass
|
||||
- (id) lottaArgs: (id) first, ...
|
||||
{
|
||||
return first;
|
||||
}
|
||||
@end
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
VarClass *my_var = [[VarClass alloc] init];
|
||||
id something = [my_var lottaArgs: @"111", @"222", nil];
|
||||
NSLog (@"%@ - %@", my_var, something); //% self.expect("expression -O -- [my_var lottaArgs:@\"111\", @\"222\", nil]", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["111"])
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1352,7 +1352,8 @@ DWARFASTParserClang::ParseTypeFromDWARF (const SymbolContext& sc,
|
|||
type_name_cstr,
|
||||
clang_type,
|
||||
accessibility,
|
||||
is_artificial);
|
||||
is_artificial,
|
||||
is_variadic);
|
||||
type_handled = objc_method_decl != NULL;
|
||||
if (type_handled)
|
||||
{
|
||||
|
|
|
@ -8331,7 +8331,8 @@ ClangASTContext::AddMethodToObjCObjectType (const CompilerType& type,
|
|||
const char *name, // the full symbol name as seen in the symbol table (lldb::opaque_compiler_type_t type, "-[NString stringWithCString:]")
|
||||
const CompilerType &method_clang_type,
|
||||
lldb::AccessType access,
|
||||
bool is_artificial)
|
||||
bool is_artificial,
|
||||
bool is_variadic)
|
||||
{
|
||||
if (!type || !method_clang_type.IsValid())
|
||||
return nullptr;
|
||||
|
@ -8391,7 +8392,6 @@ ClangASTContext::AddMethodToObjCObjectType (const CompilerType& type,
|
|||
return nullptr;
|
||||
|
||||
|
||||
bool is_variadic = false;
|
||||
bool is_synthesized = false;
|
||||
bool is_defined = false;
|
||||
clang::ObjCMethodDecl::ImplementationControl imp_control = clang::ObjCMethodDecl::None;
|
||||
|
|
Loading…
Reference in New Issue