|
|
|
|
@ -33,7 +33,7 @@
@@ -33,7 +33,7 @@
|
|
|
|
|
|
|
|
|
|
//-----------------------------------//
|
|
|
|
|
|
|
|
|
|
Parser::Parser(ParserOptions^ Opts) : Lib(Opts->Library), Opts(Opts), Index(0) |
|
|
|
|
Parser::Parser(ParserOptions^ Opts) : Lib(Opts->ASTContext), Opts(Opts), Index(0) |
|
|
|
|
{ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -2207,7 +2207,7 @@ void Parser::HandleDiagnostics(ParserResult^ res)
@@ -2207,7 +2207,7 @@ void Parser::HandleDiagnostics(ParserResult^ res)
|
|
|
|
|
ParserResult^ Parser::ParseHeader(const std::string& File) |
|
|
|
|
{ |
|
|
|
|
auto res = gcnew ParserResult(); |
|
|
|
|
res->Library = Lib; |
|
|
|
|
res->ASTContext = Lib; |
|
|
|
|
|
|
|
|
|
if (File.empty()) |
|
|
|
|
{ |
|
|
|
|
@ -2297,7 +2297,7 @@ ParserResultKind Parser::ParseArchive(llvm::StringRef File,
@@ -2297,7 +2297,7 @@ ParserResultKind Parser::ParseArchive(llvm::StringRef File,
|
|
|
|
|
return ParserResultKind::Error; |
|
|
|
|
|
|
|
|
|
auto LibName = clix::marshalString<clix::E_UTF8>(File); |
|
|
|
|
auto NativeLib = Lib->FindOrCreateLibrary(LibName); |
|
|
|
|
auto NativeLib = Symbols->FindOrCreateLibrary(LibName); |
|
|
|
|
|
|
|
|
|
for(auto it = Archive.begin_symbols(); it != Archive.end_symbols(); ++it) |
|
|
|
|
{ |
|
|
|
|
@ -2322,7 +2322,7 @@ ParserResultKind Parser::ParseSharedLib(llvm::StringRef File,
@@ -2322,7 +2322,7 @@ ParserResultKind Parser::ParseSharedLib(llvm::StringRef File,
|
|
|
|
|
return ParserResultKind::Error; |
|
|
|
|
|
|
|
|
|
auto LibName = clix::marshalString<clix::E_UTF8>(File); |
|
|
|
|
auto NativeLib = Lib->FindOrCreateLibrary(LibName); |
|
|
|
|
auto NativeLib = Symbols->FindOrCreateLibrary(LibName); |
|
|
|
|
|
|
|
|
|
llvm::error_code ec; |
|
|
|
|
for(auto it = Object->begin_symbols(); it != Object->end_symbols(); it.increment(ec)) |
|
|
|
|
@ -2351,10 +2351,11 @@ ParserResultKind Parser::ParseSharedLib(llvm::StringRef File,
@@ -2351,10 +2351,11 @@ ParserResultKind Parser::ParseSharedLib(llvm::StringRef File,
|
|
|
|
|
return ParserResultKind::Success; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ParserResult^ Parser::ParseLibrary(const std::string& File) |
|
|
|
|
ParserResult^ Parser::ParseLibrary(const std::string& File) |
|
|
|
|
{ |
|
|
|
|
auto res = gcnew ParserResult(); |
|
|
|
|
res->Library = Lib; |
|
|
|
|
res->Library = gcnew CppSharp::AST::NativeLibrary(); |
|
|
|
|
res->Library->FileName = clix::marshalString<clix::E_UTF8>(File); |
|
|
|
|
|
|
|
|
|
if (File.empty()) |
|
|
|
|
{ |
|
|
|
|
|