Commit Graph

465 Commits

Author SHA1 Message Date
Alex Lorenz
9976ad92c3 Update the Windows version of updateTripleOSVersion to account for
changes in r307372


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307377 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 10:08:52 +00:00
Alex Lorenz
25b2f9273d [Support] sys::getProcessTriple should return a macOS triple using
the system's version of macOS

sys::getProcessTriple returns LLVM_HOST_TRIPLE, whose system version might not
be the actual version of the system on which the compiler running. This commit
ensures that, for macOS, sys::getProcessTriple returns a triple with the
system's macOS version.

rdar://33177551

Differential Revision: https://reviews.llvm.org/D34446


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307372 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-07 09:53:47 +00:00
NAKAMURA Takumi
b903fddc56 [CMake] Introduce LLVM_TARGET_TRIPLE_ENV as an option to override LLVM_DEFAULT_TARGET_TRIPLE at runtime.
No behavior is changed if LLVM_TARGET_TRIPLE_ENV is blank or undefined.

If LLVM_TARGET_TRIPLE_ENV is "TEST_TARGET_TRIPLE" and $TEST_TARGET_TRIPLE is not blank,
llvm::sys::getDefaultTargetTriple() returns $TEST_TARGET_TRIPLE.
Lit resets config.target_triple and config.environment[LLVM_TARGET_TRIPLE_ENV] to change the default target.

Without changing LLVM_DEFAULT_TARGET_TRIPLE nor rebuilding, lit can be run;

  TEST_TARGET_TRIPLE=i686-pc-win32 bin/llvm-lit -sv path/to/test/
  TEST_TARGET_TRIPLE=i686-pc-win32 ninja check-clang-tools

Differential Revision: https://reviews.llvm.org/D33662

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305632 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-17 03:19:08 +00:00
Chandler Carruth
1edfb2c819 Fix one place where I missed a commented requirement for a particular
include ordering.

I've changed the structure so that clang-format will preserve this going
forward.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304788 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 12:11:24 +00:00
Chandler Carruth
e3e43d9d57 Sort the remaining #include lines in include/... and lib/....
I did this a long time ago with a janky python script, but now
clang-format has built-in support for this. I fed clang-format every
line with a #include and let it re-sort things according to the precise
LLVM rules for include ordering baked into clang-format these days.

I've reverted a number of files where the results of sorting includes
isn't healthy. Either places where we have legacy code relying on
particular include ordering (where possible, I'll fix these separately)
or where we have particular formatting around #include lines that
I didn't want to disturb in this patch.

This patch is *entirely* mechanical. If you get merge conflicts or
anything, just ignore the changes in this patch and run clang-format
over your #include lines in the files.

Sorry for any noise here, but it is important to keep these things
stable. I was seeing an increasing number of patches with irrelevant
re-ordering of #include lines because clang-format was used. This patch
at least isolates that churn, makes it easy to skip when resolving
conflicts, and gets us to a clean baseline (again).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304787 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-06 11:49:48 +00:00
Frederich Munch
908f18379e Close DynamicLibraries in reverse order they were opened.
Summary: Matches C++ destruction ordering better and fixes possible problems of loaded libraries having inter-dependencies.

Reviewers: efriedma, v.g.vassilev, chapuni

Reviewed By: efriedma

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D33652

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304720 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05 16:26:58 +00:00
Frederich Munch
dbf2bf739f Refactor DynamicLibrary so searching for a symbol will have a defined order and
libraries are properly unloaded when llvm_shutdown is called.

Summary:
This was mostly affecting usage of the JIT, where storing the library handles in
a set made iteration unordered/undefined. This lead to disagreement between the
JIT and native code as to what the address and implementation of particularly on
Windows with stdlib functions:

JIT: putenv_s("TEST", "VALUE") // called msvcrt.dll, putenv_s
JIT: getenv("TEST") -> "VALUE" // called msvcrt.dll, getenv
Native: getenv("TEST") -> NULL // called ucrt.dll, getenv

Also fixed is the issue of DynamicLibrary::getPermanentLibrary(0,0) on Windows
not giving priority to the process' symbols as it did on Unix.

Reviewers: chapuni, v.g.vassilev, lhames

Reviewed By: lhames

Subscribers: danalbert, srhines, mgorny, vsk, llvm-commits

Differential Revision: https://reviews.llvm.org/D30107

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301562 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-27 16:55:24 +00:00
Frederich Munch
be033a84a4 Revert "Refactor DynamicLibrary so searching for a symbol will have a defined order"
The i686-mingw32-RA-on-linux bot is still having errors.

This reverts commit r301236.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301240 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 20:16:01 +00:00
Frederich Munch
f5d6c7c2d3 Refactor DynamicLibrary so searching for a symbol will have a defined order and
libraries are properly unloaded when llvm_shutdown is called.

Summary:
This was mostly affecting usage of the JIT, where storing the library handles in
a set made iteration unordered/undefined. This lead to disagreement between the
JIT and native code as to what the address and implementation of particularly on
Windows with stdlib functions:

JIT: putenv_s("TEST", "VALUE") // called msvcrt.dll, putenv_s
JIT: getenv("TEST") -> "VALUE" // called msvcrt.dll, getenv
Native: getenv("TEST") -> NULL // called ucrt.dll, getenv

Also fixed is the issue of DynamicLibrary::getPermanentLibrary(0,0) on Windows
not giving priority to the process' symbols as it did on Unix.

Reviewers: chapuni, v.g.vassilev, lhames

Reviewed By: lhames

Subscribers: danalbert, srhines, mgorny, vsk, llvm-commits

Differential Revision: https://reviews.llvm.org/D30107

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301236 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 19:55:16 +00:00
Frederich Munch
ccb223e38e Revert "Refactor DynamicLibrary so searching for a symbol will have a defined order.”
The changes are causing the i686-mingw32 build to fail.

This reverts commit r301153, and the changes for a separate warning on i686-mingw32 in r301155  and r301156.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301157 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 03:33:30 +00:00
Frederich Munch
bffb4d4e84 Fix warning converting from boolean to pointer introduced in r301153.
This reverts commit r301155, which was incorrect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301156 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 03:12:16 +00:00
Frederich Munch
545de00b4b Refactor DynamicLibrary so searching for a symbol will have a defined order and
libraries are properly unloaded when llvm_shutdown is called.

Summary:
This was mostly affecting usage of the JIT, where storing the library handles in
a set made iteration unordered/undefined. This lead to disagreement between the
JIT and native code as to what the address and implementation of particularly on
Windows with stdlib functions:

JIT: putenv_s("TEST", "VALUE") // called msvcrt.dll, putenv_s
JIT: getenv("TEST") -> "VALUE" // called msvcrt.dll, getenv
Native: getenv("TEST") -> NULL // called ucrt.dll, getenv

Also fixed is the issue of DynamicLibrary::getPermanentLibrary(0,0) on Windows
not giving priority to the process' symbols as it did on Unix.

Reviewers: chapuni, v.g.vassilev, lhames

Reviewed By: lhames

Subscribers: danalbert, srhines, mgorny, vsk, llvm-commits

Differential Revision: https://reviews.llvm.org/D30107

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301153 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24 02:30:12 +00:00
Kristof Beyls
c295532b90 Remove name space pollution from Signals.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299224 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-31 14:58:52 +00:00
Kristof Beyls
1cbe5a4d1d Remove more name space pollution from .inc files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299222 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-31 14:26:44 +00:00
Kristof Beyls
1c48d9ec4d Do not pollute the namespace in a header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299218 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-31 13:48:21 +00:00
Kristof Beyls
55cd27a031 Do not pollute the namespace in a header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299203 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-31 12:00:24 +00:00
Zachary Turner
254674aa55 [Support] Fill the file_status struct with link count.
Differential Revision: https://reviews.llvm.org/D31110

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298326 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-20 23:55:20 +00:00
Zachary Turner
c33642eea7 [Support] Support both Windows and Posix paths on both platforms.
Previously which path syntax we supported dependend on what
platform we were compiling LLVM on.  While this is normally
desirable, there are situations where we need to be able to
handle a path that we know was generated on a remote host.
Remote debugging, for example, or parsing debug info.

99% of the code in LLVM for handling paths was platform
agnostic and literally just a few branches were gated behind
pre-processor checks, so this changes those sites to use
runtime checks instead, and adds a flag to every path
API that allows one to override the host native syntax.

Differential Revision: https://reviews.llvm.org/D30858

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298004 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-16 22:28:04 +00:00
James Henderson
8276800d3c [Support] Add support for getting file system permissions on Windows and implement sys::fs::set/getPermissions to work with them
This change adds support for functions to set and get file permissions, in a similar manner to the C++17 permissions() function in <filesystem>. The setter uses chmod on Unix systems and SetFileAttributes on Windows, setting the permissions as passed in. The getter simply uses the existing status() function.

Prior to this change, status() would always return an unknown value for the permissions on a Windows file, making it impossible to test the new function on Windows. I have therefore added support for this as well. On Linux, prior to this change, the permissions included the file type, which should actually be accessed via a different member of the file_status class.

Note that on Windows, only the *_write permission bits have any affect - if any are set, the file is writable, and if not, the file is read-only. This is in common with what MSDN describes for their behaviour of std::filesystem::permissions(), and also what boost::filesystem does.

The motivation behind this change is so that we can easily test behaviour on read-only files in LLVM unit tests, but I am sure that others may find it useful in some situations.

Reviewers: zturner, amccarth, aaron.ballman

Differential Revision: https://reviews.llvm.org/D30736

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297945 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-16 11:22:09 +00:00
Aaron Ballman
61d9d49df6 Reverting r297617 because it broke some bots:
http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/49970

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297618 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 12:24:51 +00:00
Aaron Ballman
565edc0441 Add support for getting file system permissions and implement sys::fs::permissions to set them.
Patch by James Henderson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297617 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-13 12:17:14 +00:00
Zachary Turner
e953f86b95 [Support] Don't return an error if realPath fails.
In openFileForRead, we would not previously return an error
if real_path resolution failed.  After a recent patch, we
started propagating this error up.  This caused a failure
in clang when trying to call openFileForRead("nul").  This
patch restores the previous behavior of not propagating this
error up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297488 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-10 18:33:41 +00:00
Zachary Turner
ad31712bf4 Add llvm::sys::fs::real_path.
LLVM already has real_path like functionality, but it is
cumbersome to use and involves clean up after (e.g. you have
to call openFileForRead, then close the resulting FD).

Furthermore, on Windows it doesn't work for directories since
opening a directory and opening a file require slightly
different flags.

So I add a simple function `real_path` which works for all
paths on all platforms and has a simple to use interface.

In doing so, I add the ability to opt in to resolving tilde
expressions (e.g. ~/foo), which are normally handled by
the shell.

Differential Revision: https://reviews.llvm.org/D30668

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297483 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-10 17:39:21 +00:00
Zachary Turner
c036eebbeb [Support] Add llvm::sys::fs::remove_directories.
We already have a function create_directories() which can create
an entire tree, and remove() which can remove an empty directory,
but we do not have remove_directories() which can remove an entire
tree.  This patch adds such a function.

Because removing a directory tree can have dangerous consequences
when the tree contains a directory symlink, the patch here updates
the existing directory_iterator construct to optionally not follow
symlinks (previously it would always follow symlinks).  The delete
algorithm uses this flag so that for symlinks, only the links are
removed, and not the targets.

On Windows this is implemented with SHFileOperation, which also
does not recurse into symbolic links or junctions.

Differential Revision: https://reviews.llvm.org/D30676

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297314 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-08 22:49:32 +00:00
Konstantin Zhuravlyov
0578f3744f Fix C2712 build error on Windows
Move the __try/__except block outside of the set_thread_name function to avoid a conflict with object unwinding due to the use of the llvm::Storage.

Differential Revision: https://reviews.llvm.org/D30707


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297192 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-07 20:09:46 +00:00
Zachary Turner
6a2cb8131e [Support] Add the option to not follow symlinks on stat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297154 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-07 16:10:10 +00:00
Zachary Turner
6a33d44017 Try to fix thread name truncation on non-Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296976 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-04 18:53:09 +00:00
Zachary Turner
7d7a5d9b46 Truncate thread names if they're too long.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296972 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-04 16:42:25 +00:00
Zachary Turner
50d14e63e0 [Support] Provide access to current thread name/thread id.
Applications often need the current thread id when making
system calls, and some operating systems provide the notion
of a thread name, which can be useful in enabling better
diagnostics when debugging or logging.

This patch adds an accessor for the thread id, and "best effort"
getters and setters for the thread name.  Since this is
non critical functionality, no error is returned to indicate
that a platform doesn't support thread names.

Differential Revision: https://reviews.llvm.org/D30526

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296887 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-03 17:15:17 +00:00
Vassil Vassilev
c59b65941e Cast to the right type on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296778 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-02 18:12:59 +00:00
Vassil Vassilev
3983dc252d Reland r296442 with modifications reverted in r296463.
Original commit message:

"Allow externally dlopen-ed libraries to be registered as permanent libraries.

This is also useful in cases when llvm is in a shared library. First we dlopen
the llvm shared library and then we register it as a permanent library in order
to keep the JIT and other services working.

Patch reviewed by Vedant Kumar (D29955)!"




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296774 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-02 17:56:45 +00:00
Vassil Vassilev
0aedea1a56 Do not leak OpenedHandles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296748 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-02 14:30:05 +00:00
NAKAMURA Takumi
aff6eee0bb Reformat a blank line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296464 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-28 10:15:25 +00:00
NAKAMURA Takumi
dd9073138b Revert r296442 (and r296443), "Allow externally dlopen-ed libraries to be registered as permanent libraries."
It broke clang/test/Analysis/checker-plugins.c

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296463 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-28 10:15:18 +00:00
Vassil Vassilev
925071a16e Fix Win bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296443 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-28 07:26:21 +00:00
Vassil Vassilev
5951ab5b7a Allow externally dlopen-ed libraries to be registered as permanent libraries.
This is also useful in cases when llvm is in a shared library. First we dlopen
the llvm shared library and then we register it as a permanent library in order
to keep the JIT and other services working.

Patch reviewed by Vedant Kumar (D29955)!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296442 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-28 07:11:59 +00:00
Zachary Turner
167b16d8fb [Support] Add a function to check if a file resides locally.
Differential Revision: https://reviews.llvm.org/D30010

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295768 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-21 20:55:47 +00:00
Vassil Vassilev
ab07cb9da1 Do not leak OpenedHandles.
Reviewed by Vedant Kumar (D30178)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295737 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-21 17:30:43 +00:00
Pavel Labath
f61f422e4e [Support] Add sys::fs::set_current_path() (aka chdir)
Summary:
This adds a cross-platform way of setting the current working directory
analogous to the existing current_path() function used for retrieving
it. The function will be used in lldb.

Reviewers: rafael, silvas, zturner

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29035

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292907 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 10:32:03 +00:00
Zachary Turner
d364009440 Add missing includes on Windows.
Patch by Andrey Khalyavin
Differential Revision: https://reviews.llvm.org/D27915

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290263 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 18:50:52 +00:00
Mehdi Amini
dbca62ee4e [ThinLTO] Add an API to trigger file-based API for returning objects to the linker
Summary:
The motivation is to support better the -object_path_lto option on
Darwin. The linker needs to write down the generate object files on
disk for later use by lldb or dsymutil (debug info are not present
in the final binary). We're moving this into libLTO so that we can
be smarter when a cache is enabled and hard-link when possible
instead of duplicating the files.

Reviewers: tejohnson, deadalnix, pcc

Subscribers: dexonsmith, llvm-commits

Differential Revision: https://reviews.llvm.org/D27507

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289631 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-14 04:56:42 +00:00
Simon Pilgrim
9ff4a73e67 Removed FIXME from include ordering comment
Nothing to fix, it's just the way it has to be.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284991 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-24 17:15:05 +00:00
Simon Pilgrim
39e6b3908d Fix windows builds by swapping windows.h and wincrypt.h ordering.
We need to include windows.h first even though it breaks default include ordering rules

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284968 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-24 12:39:23 +00:00
Pavel Labath
2864c2ae90 Remove TimeValue usage from llvm/Support
Summary:
This is a follow-up to D25416. It removes all usages of TimeValue from
llvm/Support library (except for the actual TimeValue declaration), and replaces
them with appropriate usages of std::chrono. To facilitate this, I have added
small utility functions for converting time points and durations into appropriate
OS-specific types (FILETIME, struct timespec, ...).

Reviewers: zturner, mehdi_amini

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25730

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284966 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-24 10:59:17 +00:00
Pavel Labath
911bb941ce Reapply "Add Chrono.h - std::chrono support header"
This is a resubmission of r284590. The mingw build should be fixed now. The
problem was we were matching time_t with _localtime_64s, which was incorrect on
_USE_32BIT_TIME_T systems. Instead I use localtime_s, which should always
evaluate to the correct function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284720 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-20 12:05:50 +00:00
Pavel Labath
b40b8e3413 Revert "Add Chrono.h - std::chrono support header"
This reverts commit r284590 as it fails on the mingw buildbot. I think I know the
fix, but I cannot test it right now. Will reapply when I verify it works ok.

This reverts r284590.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284615 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-19 17:17:53 +00:00
Pavel Labath
bca3cda284 Add Chrono.h - std::chrono support header
Summary:
std::chrono mostly covers the functionality of llvm::sys::TimeValue and
lldb_private::TimeValue. This header adds a bit of utility functions and
typedefs, which make the usage of the library and porting code from TimeValues
easier.

Rationale:
- TimePoint typedef - precision of system_clock is implementation defined -
  using a well-defined precision helps maintain consistency between platforms,
  makes it interact better with existing TimeValue classes, and avoids cases
  there a time point is implicitly convertible to a specific precision on some
  platforms but not on others.
- system_clock::to_time_t only accepts time_points with the default system
  precision (even though time_t has only second precision on all platforms we
  support). To avoid the need for explicit casts, I have added a toTimeT()
  wrapper function. toTimePoint(time_t) was not strictly necessary, but I have
  added it for symmetry.

Reviewers: zturner, mehdi_amini

Subscribers: beanz, mgorny, llvm-commits, modocache

Differential Revision: https://reviews.llvm.org/D25416

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284590 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-19 13:58:55 +00:00
Mehdi Amini
6f45c30387 Blind attempt to fix windows build after r283290 - Use StringRef in StringSaver API (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283294 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-05 01:41:11 +00:00
David Majnemer
2d62ce6ee8 Use the range variant of find/find_if instead of unpacking begin/end
If the result of the find is only used to compare against end(), just
use is_contained instead.

No functionality change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278469 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-12 03:55:06 +00:00
Aaron Ballman
00fb6abc74 Explicitly specify the ANSI version of these Win32 APIs. While these are seemingly unrelated changes, they are all NFC because we currently default to the ANSI versions of the APIs when building for Windows. This simply makes the ANSI usage explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273564 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23 14:45:54 +00:00