Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: tools/pnacl-llc/pnacl-llc.cpp

Issue 770853002: Fix error reporting in the PNaCl bitcode reader. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Fix nits. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/pnacl-llc/pnacl-llc.cpp
diff --git a/tools/pnacl-llc/pnacl-llc.cpp b/tools/pnacl-llc/pnacl-llc.cpp
index 5aefdf4e001f1716fb68a2658873b66152d31714..e9fe6779c1841f2396ea83529e0abc520694249e 100644
--- a/tools/pnacl-llc/pnacl-llc.cpp
+++ b/tools/pnacl-llc/pnacl-llc.cpp
@@ -325,10 +325,19 @@ static Module* getModule(StringRef ProgramName, LLVMContext &Context,
SMDiagnostic Err;
if (LazyBitcode) {
std::string StrError;
+ bool VerboseErrors =
+#if defined(__native_client__)
+ false
+#else
+ /* Print useful parse errors when not sandboxed */
+ true
+#endif
+ ;
if (InputFileFormat == PNaClFormat) {
M = getNaClStreamedBitcodeModule(
InputFilename,
- new ThreadedStreamingCache(StreamingObject), Context, &StrError);
+ new ThreadedStreamingCache(StreamingObject),
+ Context, VerboseErrors, &StrError);
} else if (InputFileFormat == LLVMFormat) {
M = getStreamedBitcodeModule(
InputFilename,

Powered by Google App Engine
This is Rietveld 408576698