[PATCH] D14231: [Support] Use GetTempDir to get the temporary dir path on Windows.

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 09:16:45 PST 2015


aaron.ballman accepted this revision.
aaron.ballman added a comment.

LGTM with one small nit about comments. Thank you for working on this!


================
Comment at: lib/Support/Windows/Path.inc:781
@@ +780,3 @@
+  if (auto PathLength = ::GetTempPathW(sizeof(Path) / sizeof(wchar_t), Path)) {
+    assert(PathLength > 0 && PathLength <= (MAX_PATH + 1) &&
+           "GetTempPath returned undocumented result");
----------------
Good catch.

================
Comment at: unittests/Support/Path.cpp:372
@@ +371,3 @@
+
+#define EXPECT_TEMP_DIR(prepare, expected)                                     \
+  EXPECT_EXIT(                                                                 \
----------------
It would be good to put some comments here as to why this is useful.


http://reviews.llvm.org/D14231





More information about the llvm-commits mailing list