[PATCH] D49867: [test] Use printf instead of C++ iostream, NFC.

Jonas Hahnfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 26 11:23:59 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL338053: [test] Use printf instead of C++ iostream, NFC. (authored by Hahnfeld, committed by ).
Herald added a subscriber: delcypher.

Changed prior to commit:
  https://reviews.llvm.org/D49867?vs=157535&id=157542#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D49867

Files:
  compiler-rt/trunk/test/ubsan/TestCases/Misc/monitor.cpp


Index: compiler-rt/trunk/test/ubsan/TestCases/Misc/monitor.cpp
===================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/Misc/monitor.cpp
+++ compiler-rt/trunk/test/ubsan/TestCases/Misc/monitor.cpp
@@ -8,7 +8,7 @@
 // Linkage issue
 // XFAIL: openbsd
 
-#include <iostream>
+#include <cstdio>
 
 extern "C" {
 void __ubsan_get_current_report_data(const char **OutIssueKind,
@@ -26,9 +26,9 @@
   __ubsan_get_current_report_data(&IssueKind, &Message, &Filename, &Line, &Col,
                                   &Addr);
 
-  std::cout << "Issue: " << IssueKind << "\n"
-            << "Location: " << Filename << ":" << Line << ":" << Col << "\n"
-            << "Message: " << Message << std::endl;
+  printf("Issue: %s\n", IssueKind);
+  printf("Location: %s:%u:%u\n", Filename, Line, Col);
+  printf("Message: %s\n", Message);
 
   (void)Addr;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49867.157542.patch
Type: text/x-patch
Size: 899 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180726/09b928ec/attachment.bin>


More information about the llvm-commits mailing list