mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 11:35:51 -04:00

Summary: The .clang-tidy file is copied from the top-level LLVM source directory. Also fix warnings generated by clang-format: * Moved SimpleHostPlatformDevice.h so its header include guard could have the right format. * Changed signatures of methods taking llvm::Twine by value to take it by const ref instead. * Add "noexcept" to some move constructors and assignment operators. * Removed a bunch of places where single-statement loops and conditionals were surrounded with braces. (This was not found by the current clang-tidy, but with a local patch that I hope to upstream soon.) Reviewers: jlebar, jprice Subscribers: parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24468 llvm-svn: 281374
29 lines
863 B
C++
29 lines
863 B
C++
//===-- HostMemory.cpp - HostMemory implementation ------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
/// \file
|
|
/// Implementation of HostMemory internals.
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "streamexecutor/HostMemory.h"
|
|
#include "streamexecutor/Device.h"
|
|
|
|
namespace streamexecutor {
|
|
namespace internal {
|
|
|
|
void destroyRegisteredHostMemoryInternals(Device *TheDevice, void *Pointer) {
|
|
// TODO(jhen): How to handle errors here?
|
|
if (Pointer)
|
|
consumeError(TheDevice->unregisterHostMemory(Pointer));
|
|
}
|
|
|
|
} // namespace internal
|
|
} // namespace streamexecutor
|