[clang] Add test for CWG190 "Layout-compatible POD-struct types" (#121668)
[llvm-project.git] / llvm / lib / Support / MemoryBufferRef.cpp
bloba93853c0acb1f1d1183bfb25501904ac31411c19
1 //===- MemoryBufferRef.cpp - Memory Buffer Reference ----------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements the MemoryBufferRef interface.
11 //===----------------------------------------------------------------------===//
13 #include "llvm/Support/MemoryBufferRef.h"
14 #include "llvm/Support/MemoryBuffer.h"
16 using namespace llvm;
18 MemoryBufferRef::MemoryBufferRef(const MemoryBuffer &Buffer)
19 : Buffer(Buffer.getBuffer()), Identifier(Buffer.getBufferIdentifier()) {}