Bikramjeet Vig has posted comments on this change. ( http://gerrit.cloudera.org:8080/8233 )
Change subject: IMPALA-6002: Add a LLVM diagnostic handler for LLVM linker errors ...................................................................... Patch Set 2: (11 comments) http://gerrit.cloudera.org:8080/#/c/8233/2/be/src/codegen/llvm-codegen.h File be/src/codegen/llvm-codegen.h: http://gerrit.cloudera.org:8080/#/c/8233/2/be/src/codegen/llvm-codegen.h@781 PS2, Line 781: /// Ensures that an attempt to read diagnostic state would reset the object. > Comment is kinda cryptic. Maybe needs some reference to the LLVM Diagnostic Done http://gerrit.cloudera.org:8080/#/c/8233/2/be/src/codegen/llvm-codegen.h@784 PS2, Line 784: > nit: extra blank line. removed http://gerrit.cloudera.org:8080/#/c/8233/2/be/src/codegen/llvm-codegen.h@785 PS2, Line 785: DiagnosticHandler() : encountered_error_(false) {} > Let's initialise the member variables inline. Removed http://gerrit.cloudera.org:8080/#/c/8233/2/be/src/codegen/llvm-codegen.h@787 PS2, Line 787: /// Returns the error string if an error was encountered and resets the state in > Can you give some hint about when a caller should call this? I.e. after an Done http://gerrit.cloudera.org:8080/#/c/8233/2/be/src/codegen/llvm-codegen.h@789 PS2, Line 789: string > std::string in a header (I guess there's a rogue "using std::string" somewh Done http://gerrit.cloudera.org:8080/#/c/8233/2/be/src/codegen/llvm-codegen.h@791 PS2, Line 791: /// Handler function that sets the state on an instance of this class > I think the comments could make the relationship between these two function Done http://gerrit.cloudera.org:8080/#/c/8233/2/be/src/codegen/llvm-codegen.h@796 PS2, Line 796: string error_str_; > Can you briefly document the member variables and the relationship between removed http://gerrit.cloudera.org:8080/#/c/8233/2/be/src/codegen/llvm-codegen.h@796 PS2, Line 796: string > std::string. Done http://gerrit.cloudera.org:8080/#/c/8233/2/be/src/codegen/llvm-codegen.h@799 PS2, Line 799: /// Maintains state set by diagnostic handler. > Comment is kinda cryptic. It may not be necessary to have both a class and Done http://gerrit.cloudera.org:8080/#/c/8233/2/be/src/codegen/llvm-codegen.cc File be/src/codegen/llvm-codegen.cc: http://gerrit.cloudera.org:8080/#/c/8233/2/be/src/codegen/llvm-codegen.cc@1621 PS2, Line 1621: DiagnosticHandler* diagnostic_handler = reinterpret_cast<DiagnosticHandler*>(context); > Can context be a nullptr in any scenarios? We should check for that before I dont think there is any scenario as far as how we are using this handler, will a DCHECK(context != nullptr) suffice instead? http://gerrit.cloudera.org:8080/#/c/8233/2/be/src/codegen/llvm-codegen.cc@1627 PS2, Line 1627: error_msg.flush(); > I feel like we should also log the error at LOG(INFO) level so that it does Done -- To view, visit http://gerrit.cloudera.org:8080/8233 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I907ff1f8975c02d422b4a669afbfc2e536ddf1ff Gerrit-Change-Number: 8233 Gerrit-PatchSet: 2 Gerrit-Owner: Bikramjeet Vig <[email protected]> Gerrit-Reviewer: Bikramjeet Vig <[email protected]> Gerrit-Reviewer: Philip Zeyliger <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Reviewer: anujphadke <[email protected]> Gerrit-Comment-Date: Wed, 11 Oct 2017 00:05:47 +0000 Gerrit-HasComments: Yes
