Changeset View
Changeset View
Standalone View
Standalone View
lldb/unittests/TestingSupport/Symbol/ClangTestUtils.h
Show All 21 Lines | |||||
} | } | ||||
inline std::unique_ptr<TypeSystemClang> createAST() { | inline std::unique_ptr<TypeSystemClang> createAST() { | ||||
return std::make_unique<TypeSystemClang>("test ASTContext", | return std::make_unique<TypeSystemClang>("test ASTContext", | ||||
HostInfo::GetTargetTriple()); | HostInfo::GetTargetTriple()); | ||||
} | } | ||||
inline CompilerType createRecord(TypeSystemClang &ast, llvm::StringRef name) { | inline CompilerType createRecord(TypeSystemClang &ast, llvm::StringRef name) { | ||||
return ast.CreateRecordType(ast.getASTContext().getTranslationUnitDecl(), | return ast.CreateRecordType(ast.getASTContext().getTranslationUnitDecl(), 0, | ||||
lldb::AccessType::eAccessPublic, name, 0, | lldb::AccessType::eAccessPublic, name, 0, | ||||
lldb::LanguageType::eLanguageTypeC); | lldb::LanguageType::eLanguageTypeC); | ||||
} | } | ||||
/// Create a record with the given name and a field with the given type | /// Create a record with the given name and a field with the given type | ||||
/// and name. | /// and name. | ||||
inline CompilerType createRecordWithField(TypeSystemClang &ast, | inline CompilerType createRecordWithField(TypeSystemClang &ast, | ||||
llvm::StringRef record_name, | llvm::StringRef record_name, | ||||
Show All 36 Lines |