-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLLVMMSFBuilder.cpp
More file actions
39 lines (32 loc) · 884 Bytes
/
Copy pathLLVMMSFBuilder.cpp
File metadata and controls
39 lines (32 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// LLVMMSFBuilder.cpp : Implementation of CLLVMMSFBuilder
#include "pch.h"
#include "LLVMMSFBuilder.h"
#include "Utilities.h"
// CLLVMMSFBuilder
void CLLVMMSFBuilder::construct(const std::shared_ptr<pdb::PDBFileBuilder>& thePDBFileBuilder)
{
pdbFileBuilder = thePDBFileBuilder;
msfBuilder = pdbFileBuilder->getMsfBuilder();
}
STDMETHODIMP CLLVMMSFBuilder::InterfaceSupportsErrorInfo(REFIID riid)
{
static const IID* const arr[] =
{
&IID_ILLVMMSFBuilder
};
for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
{
if (InlineIsEqualGUID(*arr[i],riid))
return S_OK;
}
return S_FALSE;
}
STDMETHODIMP CLLVMMSFBuilder::addStream(ULONG Size, ULONG* Res)
{
auto expected = msfBuilder->addStream(Size);
HRESULT hres = checkLLVMErrorAndSetCOMError(expected.takeError(), GetObjectCLSID(),
IID_ILLVMMSFBuilder);
if (SUCCEEDED(hres))
*Res = *expected;
return hres;
}